mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:35:42 +00:00
* use env bash instead of /bin/bash * check for variable existence Former-commit-id: 25a00ebffec9ba8c820be29c9adfd0a4c0f9cb29
36 lines
1.2 KiB
Bash
Executable File
36 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euxo pipefail
|
|
|
|
cd ${WORKSPACE}
|
|
|
|
IDENT="eagle0_${BRANCH_NAME}_${BUILD_NUMBER}"
|
|
|
|
/bin/echo "Zipping"
|
|
/bin/tar cfh - eagle0mac/${IDENT}.app | pigz > eagle0mac/${IDENT}.tar.gz
|
|
/bin/echo "Sending to iMac"
|
|
/usr/bin/scp ./eagle0mac/${IDENT}.tar.gz jenkins@192.168.123.100:~/bins-to-sign/
|
|
/usr/bin/ssh jenkins@192.168.123.100 <<ENDSSH
|
|
set -euxo pipefail
|
|
|
|
/usr/local/bin/pigz -dc ~/bins-to-sign/${IDENT}.tar.gz | /usr/bin/tar -xf - -C ~/bins-to-sign/
|
|
/bin/rm ~/bins-to-sign/${IDENT}.tar.gz
|
|
/usr/bin/security unlock-keychain
|
|
$KEYCHAIN_PASSWORD
|
|
/usr/bin/codesign \
|
|
--deep \
|
|
--force \
|
|
--verify \
|
|
--verbose \
|
|
--timestamp \
|
|
--options runtime \
|
|
--entitlements "eagle0.entitlements" \
|
|
--sign "Developer ID Application: Daniel Crosby (UWJ88DX8WQ)" ~/bins-to-sign/eagle0mac/${IDENT}.app
|
|
/usr/bin/ditto -c -k --keepParent ~/bins-to-sign/eagle0mac/${IDENT}.app ~/bins-to-sign/${IDENT}_signed.zip
|
|
/usr/bin/xcrun notarytool submit ~/bins-to-sign/${IDENT}_signed.zip \
|
|
--keychain-profile "notarization-password" \
|
|
--webhook "https://eagle0.net/jenkins/generic-webhook-trigger/invoke?token=${JENKINS_NOTARIZATION_WEBHOOK_TOKEN}&IDENT=${IDENT}"
|
|
/usr/bin/security lock-keychain
|
|
|
|
ENDSSH
|