scripts: Update code signing scripts (#8746)

* scripts/codesign_example: Fix reference to SHASUM_PROG variable

* scripts/sign: Add check for required Artifactory token
This commit is contained in:
Wilken Rivera 2020-02-14 17:38:56 -05:00 committed by GitHub
parent 909b9fcfc7
commit 9c171c1f13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -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"

View File

@ -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