@@ -5,13 +5,13 @@ APPLE_CERT_DEVELOPER_INSTALLER="apple_dev_installer_cert.p12"
5
5
APPLE_CERT_DEVELOPER_APPLICATION=" apple_dev_application_cert.p12"
6
6
7
7
# Decode Developer ID Installer certificate from base64 into temporary file
8
- base64 -d $APPLE_CERT_DEVELOPER_INSTALLER_BASE64 > $APPLE_CERT_DEVELOPER_INSTALLER
8
+ base64 -d < $APPLE_CERT_DEVELOPER_INSTALLER_BASE64 > $APPLE_CERT_DEVELOPER_INSTALLER
9
9
10
10
# Check the checksum of the decoded Developer ID Installer certificate
11
11
echo " 1f9d2dfd1a6dc87c87fe0426a6ee136e $APPLE_CERT_DEVELOPER_INSTALLER " | md5sum -c -
12
12
13
13
# Decode Developer ID Application certificate from base64 into temporary file
14
- base64 -d $APPLE_CERT_DEVELOPER_APPLICATION_BASE64 > $APPLE_CERT_DEVELOPER_APPLICATION
14
+ base64 -d < $APPLE_CERT_DEVELOPER_APPLICATION_BASE64 > $APPLE_CERT_DEVELOPER_APPLICATION
15
15
16
16
# Check the checksum of the decoded Developer ID Application certificate
17
17
echo " 658613e0abe5c3187284e9662f18e1f0 $APPLE_CERT_DEVELOPER_APPLICATION " | md5sum -c -
@@ -31,6 +31,9 @@ if [ $? -ne 0 ]; then
31
31
exit 1
32
32
fi
33
33
34
+ # reload the keychain to ensure the changes are applied
35
+ security set-key-partition-list -S apple-tool:,apple: -k " $MAC_USERNAME_PASSWORD " $KEYCHAIN_PATH
36
+
34
37
# Import Developer ID Installer certificate to the keychain
35
38
security import $APPLE_CERT_DEVELOPER_APPLICATION -k $KEYCHAIN_PATH -P $APPLE_CERT_DEVELOPER_APPLICATION_PASSWORD -T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/xcrun -T /usr/bin/productsign -T /usr/bin/productbuild
36
39
@@ -40,6 +43,9 @@ if [ $? -ne 0 ]; then
40
43
exit 1
41
44
fi
42
45
46
+ # reload the keychain to ensure the changes are applied
47
+ security set-key-partition-list -S apple-tool:,apple: -k " $MAC_USERNAME_PASSWORD " $KEYCHAIN_PATH
48
+
43
49
# Inform the user about the successful import
44
50
echo " Certificates imported successfully to $KEYCHAIN_PATH "
45
51
0 commit comments