summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-09-28 14:43:00 +0200
committerCarl Hetherington <cth@carlh.net>2020-09-28 20:17:26 +0200
commitb65c36ffa24bb5cc62453c13f8fe3da6cc998011 (patch)
tree9155add30b3606f9326da6cf11f9a6df19a81a0f
parent29bd2c29acf8662dfa50dac6f038500f9190ba0b (diff)
Do security unlock-keychain before building on macOS.
-rwxr-xr-xcdist8
1 files changed, 8 insertions, 0 deletions
diff --git a/cdist b/cdist
index 39b3944..32571f7 100755
--- a/cdist
+++ b/cdist
@@ -107,6 +107,8 @@ class Config:
Option('osx_environment_prefix'),
Option('osx_sdk_prefix'),
Option('osx_sdk'),
+ Option('osx_keychain_file'),
+ Option('osx_keychain_password'),
Option('apple_id'),
Option('apple_password'),
BoolOption('docker_sudo'),
@@ -739,10 +741,16 @@ class OSXTarget(Target):
self.environment_prefix = config.get('osx_environment_prefix')
self.apple_id = config.get('apple_id')
self.apple_password = config.get('apple_password')
+ self.osx_keychain_file = config.get('osx_keychain_file')
+ self.osx_keychain_password = config.get('osx_keychain_password')
def command(self, c):
command('%s %s' % (self.variables_string(False), c))
+ def build(self, *a, **k):
+ self.command('security unlock-keychain -p %s %s' % (self.osx_keychain_password, self.osx_keychain_file))
+ return super().build(*a, **k)
+
class OSXSingleTarget(OSXTarget):
def __init__(self, bits, directory=None):