Skip to content
Snippets Groups Projects
Commit b8ccedc8 authored by callum_linden's avatar callum_linden
Browse files

Read password for developer keychain from build-secrets repo and use it to unlock keychain.

Only unlock and code sign if running under Team City.
parent 27d55474
No related branches found
No related tags found
No related merge requests found
...@@ -821,11 +821,24 @@ def package_finish(self): ...@@ -821,11 +821,24 @@ def package_finish(self):
identity = self.args['signature'] identity = self.args['signature']
if identity == '': if identity == '':
identity = 'Developer ID Application' identity = 'Developer ID Application'
self.run_command('codesign --force --sign %(identity)r %(bundle)r' % {
'identity': identity, # Look for an environment variable set via build.sh when running in Team City.
'bundle': self.get_dst_prefix() try:
}) build_secrets_checkout = os.environ['build_secrets_checkout']
except KeyError:
pass
else:
# variable found so use it to unlock keyvchain followed by codesign
home_path = os.environ['HOME']
keychain_pwd_path = os.path.join(build_secrets_checkout,'code-signing-osx'.'password.txt')
keychain_pwd = open(keychain_pwd_path).read().rstrip()
self.run_command('security unlock-keychain -p "%s" "%s/Library/Keychains/developer.keychain"' % ( keychain_pwd, home_path ) )
self.run_command('codesign --force --sign --verboose %(identity)r %(bundle)r' % {
'identity': identity,
'bundle': self.get_dst_prefix()
})
channel_standin = 'Second Life Viewer' # hah, our default channel is not usable on its own channel_standin = 'Second Life Viewer' # hah, our default channel is not usable on its own
if not self.default_channel(): if not self.default_channel():
channel_standin = self.channel() channel_standin = self.channel()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment