From 02794f368b44c1a482f87212b901f4cf99084c12 Mon Sep 17 00:00:00 2001 From: rsp2k Date: Wed, 6 Oct 2021 13:58:30 -0600 Subject: [PATCH 1/3] Add friendly check for jq --- build-latest.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build-latest.sh b/build-latest.sh index 54ebe36..3ddb607 100755 --- a/build-latest.sh +++ b/build-latest.sh @@ -3,6 +3,15 @@ echo "▶️ $0 $*" +### +# Check for the jq library needed for parsing JSON +### +if [ ! command -v jq &> /dev/null ] +then + echo "⚠️ PRERELEASE must be either unset, 'true' or 'false', but was '${PRERELEASE}'!" + exit 1 +fi + ### # Checking for the presence of GITHUB_OAUTH_CLIENT_ID # and GITHUB_OAUTH_CLIENT_SECRET From ab41eaa5d9246d693c99263302b07ae704bc4d51 Mon Sep 17 00:00:00 2001 From: rsp2k Date: Thu, 7 Oct 2021 11:12:35 -0600 Subject: [PATCH 2/3] Add friendly message/exit when jq isn't available --- build-latest.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build-latest.sh b/build-latest.sh index 3ddb607..f444a69 100755 --- a/build-latest.sh +++ b/build-latest.sh @@ -6,9 +6,8 @@ echo "▶️ $0 $*" ### # Check for the jq library needed for parsing JSON ### -if [ ! command -v jq &> /dev/null ] -then - echo "⚠️ PRERELEASE must be either unset, 'true' or 'false', but was '${PRERELEASE}'!" +if ! command -v jq; then + echo "⚠️ jq command missing from \$PATH!" exit 1 fi From d4f9bb6da3459dc7d404de2e260a5bfe3407aea8 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Thu, 14 Oct 2021 08:30:07 +0200 Subject: [PATCH 3/3] Shellcheck errors --- build-latest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-latest.sh b/build-latest.sh index f444a69..bcafda4 100755 --- a/build-latest.sh +++ b/build-latest.sh @@ -7,8 +7,8 @@ echo "▶️ $0 $*" # Check for the jq library needed for parsing JSON ### if ! command -v jq; then - echo "⚠️ jq command missing from \$PATH!" - exit 1 + echo "⚠️ jq command missing from \$PATH!" + exit 1 fi ###