Merge pull request #958 from tobiasge/954-use-skopeo

Added check for commands to all scripts
This commit is contained in:
Tobias Genannt 2023-03-15 14:16:39 +01:00 committed by GitHub
commit ab7e19df55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 7 deletions

View File

@ -0,0 +1,9 @@
#!/bin/bash
NEEDED_COMMANDS="curl jq docker skopeo"
for c in $NEEDED_COMMANDS; do
if ! command -v "$c" &>/dev/null; then
echo "⚠️ '$c' is not installed. Can't proceed with build."
exit 1
fi
done

View File

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
# Builds the latest released version # Builds the latest released version
# Check if we have everything needed for the build
source ./build-functions/check-commands.sh
source ./build-functions/gh-functions.sh source ./build-functions/gh-functions.sh
echo "▶️ $0 $*" echo "▶️ $0 $*"

View File

@ -137,13 +137,8 @@ END_OF_HELP
fi fi
fi fi
NEEDED_COMMANDS="curl jq docker skopeo" # Check if we have everything needed for the build
for c in $NEEDED_COMMANDS; do source ./build-functions/check-commands.sh
if ! command -v "$c" &>/dev/null; then
echo "⚠️ '$c' is not installed. Can't proceed with build."
exit 1
fi
done
source ./build-functions/gh-functions.sh source ./build-functions/gh-functions.sh