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 d061665 commit 12c539f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions install_dist_certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ CERTIFICATE_P12=dist_certificate.p12
# Recreate the certificate from the secure environment variable
echo $BUILD_CERTIFICATE_KEY | base64 --decode > $CERTIFICATE_P12

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 --- Keychain status after unlocking:"
security show-keychain-info $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;
Expand All @@ -22,7 +24,10 @@ 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"
echo "XXX --- Keychain status after setting key partition list:"
security show-keychain-info $BUILD_KEYCHAIN

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

Expand Down
3 changes: 3 additions & 0 deletions install_dist_profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ echo "XXX --- Unlocking keychain..."
# Unlock the keychain
security unlock-keychain -p $BUILD_KEYCHAIN_PASSWORD $BUILD_KEYCHAIN

echo "XXX --- Keychain status after unlocking:"
security show-keychain-info $BUILD_KEYCHAIN

echo "XXX --- Create a directory for provisioning profiles"
# Create a directory for provisioning profiles
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
Expand Down

0 comments on commit 12c539f

Please sign in to comment.