Merge Apple Notary tool fixes back to main
commit
734b9a9d41
|
|
@ -178,6 +178,8 @@ jobs:
|
||||||
echo -n "$FS_CERT_PASS" >${build_secrets_checkout}/code-signing-osx/password.txt
|
echo -n "$FS_CERT_PASS" >${build_secrets_checkout}/code-signing-osx/password.txt
|
||||||
echo -n "$NOTARIZE_CREDS" | base64 --decode --output ${build_secrets_checkout}/code-signing-osx/notarize_creds.sh
|
echo -n "$NOTARIZE_CREDS" | base64 --decode --output ${build_secrets_checkout}/code-signing-osx/notarize_creds.sh
|
||||||
security create-keychain -p "$FS_KEYCHAIN_PASS" ~/Library/Keychains/viewer.keychain
|
security create-keychain -p "$FS_KEYCHAIN_PASS" ~/Library/Keychains/viewer.keychain
|
||||||
|
# notarize tool uses a specific database keychain by default we need to override this to ours.
|
||||||
|
security default-keychain -s viewer.keychain
|
||||||
security set-keychain-settings -lut 21600 ~/Library/Keychains/viewer.keychain
|
security set-keychain-settings -lut 21600 ~/Library/Keychains/viewer.keychain
|
||||||
security unlock-keychain -p "$FS_KEYCHAIN_PASS" ~/Library/Keychains/viewer.keychain
|
security unlock-keychain -p "$FS_KEYCHAIN_PASS" ~/Library/Keychains/viewer.keychain
|
||||||
security import ${build_secrets_checkout}/code-signing-osx/fs-cert.p12 -P "$FS_CERT_PASS" -A -t cert -f pkcs12 -k ~/Library/Keychains/viewer.keychain
|
security import ${build_secrets_checkout}/code-signing-osx/fs-cert.p12 -P "$FS_CERT_PASS" -A -t cert -f pkcs12 -k ~/Library/Keychains/viewer.keychain
|
||||||
|
|
|
||||||
|
|
@ -11,43 +11,27 @@ if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
zip_file=${app_file/app/zip}
|
zip_file=${app_file/app/zip}
|
||||||
ditto -c -k --keepParent "$app_file" "$zip_file"
|
ditto -c -k --keepParent "$app_file" "$zip_file"
|
||||||
if [[ -f "$zip_file" ]]; then
|
if [[ -f "$zip_file" ]]; then
|
||||||
res=$(xcrun altool --notarize-app --primary-bundle-id "org.firestormviewer.firestorm" \
|
# res=$(xcrun notarytool store-credentials \
|
||||||
--username $USERNAME \
|
# viewer.profile \
|
||||||
|
# --verbose 2>*1)
|
||||||
|
# echo $res
|
||||||
|
res=$(xcrun notarytool submit "$zip_file" \
|
||||||
|
--apple-id $USERNAME \
|
||||||
--password $PASSWORD \
|
--password $PASSWORD \
|
||||||
--asc-provider $ASC_PROVIDER \
|
--verbose \
|
||||||
--file "$zip_file" 2>&1)
|
--wait 2>&1)
|
||||||
|
echo "Notarytool submit:"
|
||||||
echo $res
|
echo $res
|
||||||
|
|
||||||
requestUUID=$(echo $res | awk '/RequestUUID/ { print $NF; }')
|
[[ "$res" =~ 'id: '([^[:space:]]+) ]]
|
||||||
if [[ -n $requestUUID ]]; then
|
match=$?
|
||||||
in_progress=1
|
|
||||||
while [[ $in_progress -eq 1 ]]; do
|
|
||||||
sleep 30
|
|
||||||
res=$(xcrun altool --notarization-info "$requestUUID" \
|
|
||||||
--username $USERNAME \
|
|
||||||
--password $PASSWORD 2>&1)
|
|
||||||
if [[ $res != *"in progress"* ]]; then
|
|
||||||
in_progress=0
|
|
||||||
fi
|
|
||||||
echo "."
|
|
||||||
done
|
|
||||||
# log results
|
|
||||||
echo $res
|
|
||||||
|
|
||||||
#remove temporary file
|
if [[ ! $match -eq 0 ]]; then
|
||||||
rm "$zip_file"
|
echo "Running Stapler"
|
||||||
|
|
||||||
if [[ $res == *"success"* ]]; then
|
|
||||||
xcrun stapler staple "$app_file"
|
xcrun stapler staple "$app_file"
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ $res == *"invalid"* ]]; then
|
|
||||||
echo "Notarization error: failed to process the app file"
|
|
||||||
exit 1
|
|
||||||
else
|
else
|
||||||
echo "Notarization error: unknown response status"
|
echo "Notarization error"
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Notarization error: couldn't get request UUID"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -620,15 +620,9 @@ if [ $WANTS_BUILD -eq $TRUE ] ; then
|
||||||
make -j $JOBS | tee -a $LOG
|
make -j $JOBS | tee -a $LOG
|
||||||
fi
|
fi
|
||||||
elif [ $TARGET_PLATFORM == "windows" ] ; then
|
elif [ $TARGET_PLATFORM == "windows" ] ; then
|
||||||
if [ "${AUTOBUILD_VSVER}" -ge 170 ] ; then
|
|
||||||
msbuild.exe Firestorm.sln -p:Configuration=${BTYPE} -flp:LogFile="logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.log" \
|
msbuild.exe Firestorm.sln -p:Configuration=${BTYPE} -flp:LogFile="logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.log" \
|
||||||
-flp1:"errorsonly;LogFile=logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.err" -p:Platform=${AUTOBUILD_WIN_VSPLATFORM} -t:Build -p:useenv=true \
|
-flp1:"errorsonly;LogFile=logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.err" -p:Platform=${AUTOBUILD_WIN_VSPLATFORM} -t:Build -p:useenv=true \
|
||||||
-verbosity:normal -toolsversion:Current -p:"VCBuildAdditionalOptions= /incremental"
|
-verbosity:normal -toolsversion:Current -p:"VCBuildAdditionalOptions= /incremental"
|
||||||
else
|
|
||||||
msbuild.exe Firestorm.sln -p:Configuration=${BTYPE} -flp:LogFile="logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.log" \
|
|
||||||
-flp1:"errorsonly;LogFile=logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.err" -p:Platform=${AUTOBUILD_WIN_VSPLATFORM} -t:Build -p:useenv=true \
|
|
||||||
-verbosity:normal -toolsversion:15.0 -p:"VCBuildAdditionalOptions= /incremental"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
# Check the return code of the build command
|
# Check the return code of the build command
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue