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:
parent
909b9fcfc7
commit
9c171c1f13
|
@ -156,6 +156,6 @@ signed_checksum=$(
|
||||||
| grep -i "x-checksum-sha256" | awk 'gsub("[\r\n]", "", $2) {print $2;}'
|
| 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"
|
mv "signed_${SN_ID}.zip" "$TARGET_ZIP"
|
||||||
|
|
|
@ -8,6 +8,13 @@
|
||||||
# export PRODUCT_NAME="packer"
|
# export PRODUCT_NAME="packer"
|
||||||
# export ARTIFACTORY_TOKEN=$ARTIFACTORY_TOKEN
|
# 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.
|
# Get the parent directory of where this script is.
|
||||||
SOURCE="${BASH_SOURCE[0]}"
|
SOURCE="${BASH_SOURCE[0]}"
|
||||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
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
|
./scripts/codesign_example.sh
|
||||||
done
|
done
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue