ci: base encode the pw
This commit is contained in:
1 parent
6b04480318
commit
6aff2604d7
1 file changed
+8
-6
+8
-6
@@ -48,27 +48,29 @@ case $OSTYPE in
|
||||
|
||||
set +x
|
||||
if [ -n "$MACOS_TEAM_ID" ] ; then
|
||||
MACOS_PW=$(echo $MACOS_CERT_PW | base64 --decode)
|
||||
echo "pw sha"
|
||||
echo $MACOS_PW | shasum
|
||||
|
||||
# Remove pesky additional quotes from default-keychain output
|
||||
def_keychain=$(eval echo $(security default-keychain -d user))
|
||||
echo "Default keychain is $def_keychain"
|
||||
echo "Speculative delete of build.keychain"
|
||||
security delete-keychain build.keychain || true
|
||||
echo "Create build.keychain"
|
||||
security create-keychain -p "$MACOS_CERT_PW" build.keychain
|
||||
security create-keychain -p "$MACOS_PW" build.keychain
|
||||
echo "Make build.keychain the default"
|
||||
security default-keychain -d user -s build.keychain
|
||||
echo "Unlock build.keychain"
|
||||
security unlock-keychain -p "$MACOS_CERT_PW" build.keychain
|
||||
security unlock-keychain -p "$MACOS_PW" build.keychain
|
||||
echo "Import .p12 data"
|
||||
echo $MACOS_CERT | base64 --decode > /tmp/certificate.p12
|
||||
echo "decoded sha"
|
||||
shasum /tmp/certificate.p12
|
||||
echo "pw sha"
|
||||
echo $MACOS_CERT_PW | shasum
|
||||
security import /tmp/certificate.p12 -k build.keychain -P "$MACOS_CERT_PW" -T /usr/bin/codesign
|
||||
security import /tmp/certificate.p12 -k build.keychain -P "$MACOS_PW" -T /usr/bin/codesign
|
||||
rm /tmp/certificate.p12
|
||||
echo "Grant apple tools access to build.keychain"
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CERT_PW" build.keychain
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_PW" build.keychain
|
||||
echo "Codesign"
|
||||
/usr/bin/codesign --keychain build.keychain --force --options runtime --deep --sign "$MACOS_TEAM_ID" $zipdir/WezTerm.app/
|
||||
echo "Restore default keychain"
|
||||
|
||||
Reference in new issue
Block a user