3
0
Fork 0
forked from mirrors/nixpkgs

titaniumenv: add hack to reduce keychain blocking problems

This commit is contained in:
Sander van der Burg 2018-01-09 13:24:30 +01:00
parent 7a891ebbdd
commit a18da9b689

View file

@ -19,6 +19,7 @@ let
deleteKeychain = ''
security default-keychain -s login.keychain
security delete-keychain $keychainName
rm -f $HOME/lock-keychain
'';
# On macOS, the java executable shows an -unoffical postfix in the version
@ -131,7 +132,18 @@ stdenv.mkDerivation {
then
ln -s ${titaniumsdk}/modules modules
fi
# Take precautions to prevent concurrent builds blocking the keychain
while [ -f $HOME/lock-keychain ]
do
echo "Keychain locked, waiting for a couple of seconds, or remove $HOME/lock-keychain to unblock..."
sleep 3
done
touch $HOME/lock-keychain
security default-keychain -s $keychainName
# Do the actual build
titanium build --config-file $TMPDIR/config.json --force --no-colors --platform ios --target dist-adhoc --pp-uuid $provisioningId --distribution-name "${iosCertificateName}" --keychain $HOME/Library/Keychains/$keychainName-db --device-family universal --ios-version ${iosVersion} --output-dir $out