self.privileged = True
-def notarize(dmg, bundle_id):
+def notarize_dmg(dmg, bundle_id):
p = subprocess.run(
['xcrun', 'altool', '--notarize-app', '-t', 'osx', '-f', dmg, '--primary-bundle-id', bundle_id, '-u', config.get('apple_id'), '-p', config.get('apple_password'), '--output-format', 'xml'],
capture_output=True
if not isinstance(x, tuple):
raise Error('macOS packages must be returned from cscript as tuples of (dmg-filename, bundle-id)')
if not no_notarize:
- notarize(x[0], x[1])
+ notarize_dmg(x[0], x[1])
self._copy_packages(tree, [x[0] for x in p], output_dir)
self.unlock_keychain()
tree = globals.trees.get(project, checkout, self)
with TreeDirectory(tree):
- if len(inspect.getfullargspec(tree.cscript['package']).args) == 3:
- packages = tree.call('package', tree.version, options)
- else:
- log_normal("Deprecated cscript package() method with no options parameter")
- packages = tree.call('package', tree.version)
+ self._build_packages(tree, options)
for p in packages:
copyfile(p, os.path.join(output_dir, os.path.basename(devel_to_git(tree.git_commit, p))))