Skip to content

Commit d709ab2

Browse files
committed
osx buildPG.sh: don't try to decode certificates if we are not in master
1 parent 8e2150e commit d709ab2

1 file changed

Lines changed: 18 additions & 15 deletions

File tree

scripts/osx/buildPG.sh

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,24 @@ sign_and_upload(){
5151
}
5252

5353
import_certificate(){
54-
echo "Decoding signing certificates"
55-
cd ${pg_root}/scripts
56-
openssl aes-256-cbc -K $encrypted_b485a78f2982_key -iv $encrypted_b485a78f2982_iv -in developer_ID.p12.enc -out developer_ID.p12 -d
57-
echo "Creating keychain"
58-
security create-keychain -p mysecretpassword build.keychain
59-
security -v list-keychains -s build.keychain "$HOME/Library/Keychains/login.keychain"
60-
echo "Setting keychain as default"
61-
security default-keychain -s build.keychain
62-
echo "Unlocking keychain"
63-
security unlock-keychain -p mysecretpassword build.keychain
64-
security set-keychain-settings -t 3600 -u build.keychain
65-
echo "Importing signing certificates"
66-
sudo security import developer_ID.p12 -k build.keychain -P $CERT_PWD -T /usr/bin/codesign
67-
# security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain
68-
# security find-identity -v
54+
echo "${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}";
55+
if [ "${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}" = "openframeworks/projectGenerator/master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
56+
echo "Decoding signing certificates"
57+
cd ${pg_root}/scripts
58+
openssl aes-256-cbc -K $encrypted_b485a78f2982_key -iv $encrypted_b485a78f2982_iv -in developer_ID.p12.enc -out developer_ID.p12 -d
59+
echo "Creating keychain"
60+
security create-keychain -p mysecretpassword build.keychain
61+
security -v list-keychains -s build.keychain "$HOME/Library/Keychains/login.keychain"
62+
echo "Setting keychain as default"
63+
security default-keychain -s build.keychain
64+
echo "Unlocking keychain"
65+
security unlock-keychain -p mysecretpassword build.keychain
66+
security set-keychain-settings -t 3600 -u build.keychain
67+
echo "Importing signing certificates"
68+
sudo security import developer_ID.p12 -k build.keychain -P $CERT_PWD -T /usr/bin/codesign
69+
# security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain
70+
# security find-identity -v
71+
fi
6972
}
7073

7174

0 commit comments

Comments
 (0)