Skip to content

Commit

Permalink
Change script
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-amisha-i committed Mar 4, 2024
1 parent cc2ad24 commit ba50eed
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions install_dist_certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ CERTIFICATE_P12=dist_certificate.p12
# Recreate the certificate from the secure environment variable
echo $BUILD_CERTIFICATE_KEY | base64 --decode > $CERTIFICATE_P12

# Lock the keychain
#security lock-keychain $BUILD_KEYCHAIN

# Unlock the keychain
#security unlock-keychain -p $BUILD_KEYCHAIN_PASSWORD $BUILD_KEYCHAIN

echo "XXX --- BUILD_KEYCHAIN_PASSWORD: $BUILD_KEYCHAIN_PASSWORD"
# Set keychain settings
security set-keychain-settings $BUILD_KEYCHAIN

echo "XXX --- Unlocking keychain..."
# Unlock the keychain
security unlock-keychain -p $BUILD_KEYCHAIN_PASSWORD $BUILD_KEYCHAIN

echo "XXX --- Import the certificate to the keychain"
# Import the certificate to the keychain
security import $CERTIFICATE_P12 -k $BUILD_KEYCHAIN -P $BUILD_CERTIFICATE_PASSWORD -T /usr/bin/codesign;

echo "XXX --- Set key partition list"
# Set key partition list
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $BUILD_KEYCHAIN_PASSWORD $BUILD_KEYCHAIN

echo "XXX --- Lock the keychain"
# Lock the keychain
security lock-keychain $BUILD_KEYCHAIN

Expand Down

0 comments on commit ba50eed

Please sign in to comment.