diff --git a/scripts/codesign_example.sh b/scripts/codesign_example.sh index 14d7ed6ef..b7a93badc 100755 --- a/scripts/codesign_example.sh +++ b/scripts/codesign_example.sh @@ -156,6 +156,6 @@ signed_checksum=$( | grep -i "x-checksum-sha256" | awk 'gsub("[\r\n]", "", $2) {print $2;}' ) -echo "${signed_checksum} signed_${SN_ID}.zip" | SHASUM_PROG -c +echo "${signed_checksum} signed_${SN_ID}.zip" | $SHASUM_PROG -c mv "signed_${SN_ID}.zip" "$TARGET_ZIP" diff --git a/scripts/sign.sh b/scripts/sign.sh index 850aa5d0e..e74ad70e3 100755 --- a/scripts/sign.sh +++ b/scripts/sign.sh @@ -8,6 +8,13 @@ # export PRODUCT_NAME="packer" # export ARTIFACTORY_TOKEN=$ARTIFACTORY_TOKEN +ARTIFACTORY_TOKEN="${ARTIFACTORY_TOKEN:-""}" + +if [ -z "$ARTIFACTORY_TOKEN" ]; then + echo "Missing required Artifactory credentials" + exit 1 +fi + # Get the parent directory of where this script is. SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done @@ -28,4 +35,4 @@ for DARWIN_BIN in $(find ./pkg/dist/*darwin_*.zip); do ./scripts/codesign_example.sh done -exit 0 \ No newline at end of file +exit 0