Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwcarlson committed Oct 28, 2023
1 parent 348d451 commit 14817c4
Show file tree
Hide file tree
Showing 7 changed files with 905 additions and 405 deletions.
821 changes: 418 additions & 403 deletions .github/workflows/project.yaml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ https:
upsun-demo
commands.yaml
wait.sh
auto.sh
auto.sh
pretty.yaml
Empty file added http:/127.0.0.1:5001
Empty file.
457 changes: 457 additions & 0 deletions save_triggers.yaml

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions utils/tests/command_installed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# Examples:
# - ./utils/tests/command_installed.sh upsun

COMMAND=$1

if ! [ -x "$(command -v $COMMAND)" ]; then
echo "::error::'$COMMAND' is not installed and/or not executable. Exiting." >&2
exit 1
else
echo "::notice::'$COMMAND' is installed and executable. Success."
fi
15 changes: 15 additions & 0 deletions utils/tests/compare_strings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

# Examples:
# - ./utils/tests/compare_strings [RESULT_STRING] [EXPECTED_STRING] [JOB_DESCRIPTOR]

RESULT_STRING=$1
EXPECTED_STRING=$2
JOB_DESCRIPTOR=$3

if [ "$RESULT_STRING" != "$EXPECTED_STRING" ]; then
echo "::error::$JOB_DESCRIPTOR was not successful. Exiting."
exit 1
else
echo "::notice::$JOB_DESCRIPTOR was successful."
fi
1 change: 0 additions & 1 deletion utils/tests/url_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ URL_DESCRIPTOR=$3

STATUS=$(curl --silent --head $URL | awk '/^HTTP/{print $2}')
if [ "$STATUS" != "$EXPECTED_STATUS" ]; then
echo "::notice::$URL_ did not succeed. Exiting."
echo "::error::Unexpected status for $URL_DESCRIPTOR."
echo "::error::Got '$STATUS', expected '$EXPECTED_STATUS'. Exiting."
exit 1
Expand Down

0 comments on commit 14817c4

Please sign in to comment.