azure|build_macos: Always export NOTARIZE and check its value (#8717)

* azure: Always export `NOTARIZE`

This *should* fix failures like 
https://dev.azure.com/chianetwork/Build%20MacOS%20Mojave%20chia-blockchain/_build/results?buildId=15533&view=logs&j=69944193-f126-526b-b021-abb6fb4b38ee&t=fa98ba94-cfb8-59e8-e95b-1eee1a49caed&l=906

* build_macos: Test the actual value of `NOTARIZE`
This commit is contained in:
dustinface 2021-10-05 15:22:03 +02:00 committed by GitHub
parent e1f35c0356
commit acbbd3a3dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -68,7 +68,8 @@ steps:
export APPLE_NOTARIZE_USERNAME
APPLE_NOTARIZE_PASSWORD="$(APPLE_NOTARIZE_PASSWORD)"
export APPLE_NOTARIZE_PASSWORD
if [ "$(APPLE_NOTARIZE_PASSWORD)" ]; then NOTARIZE="true"; export NOTARIZE; fi
if [ "$(APPLE_NOTARIZE_PASSWORD)" ]; then NOTARIZE="true"; else NOTARIZE="false"; fi
export NOTARIZE
cd build_scripts || exit
sh build_macos.sh
displayName: "Build DMG with build_scripts/build_macos.sh"

View File

@ -65,7 +65,7 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
exit $LAST_EXIT_CODE
fi
if [ "$NOTARIZE" ]; then
if [ "$NOTARIZE" == true ]; then
electron-osx-sign Chia-darwin-x64/Chia.app --platform=darwin \
--hardened-runtime=true --provisioning-profile=chiablockchain.provisionprofile \
--entitlements=entitlements.mac.plist --entitlements-inherit=entitlements.mac.plist \
@ -91,7 +91,7 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
exit $LAST_EXIT_CODE
fi
if [ "$NOTARIZE" ]; then
if [ "$NOTARIZE" == true ]; then
echo "Notarize $DMG_NAME on ci"
cd final_installer || exit
notarize-cli --file=$DMG_NAME --bundle-id net.chia.blockchain \