-def notarize(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
- )
-
- def string_after(process, key):
- lines = p.stdout.decode('utf-8').splitlines()
- request_uuid = None
- for i in range(0, len(lines)):
- if lines[i].find(key) != -1:
- return lines[i+1].strip().replace('<string>', '').replace('</string>', '')
-
- raise Error("Missing expected response %s from Apple" % key)
-
- request_uuid = string_after(p, "RequestUUID")
-
- for i in range(0, 30):
- print('Checking up on %s' % request_uuid)
- p = subprocess.run(['xcrun', 'altool', '--notarization-info', request_uuid, '-u', config.get('apple_id'), '-p', config.get('apple_password'), '--output-format', 'xml'], capture_output=True)
- status = string_after(p, 'Status')
- print('Got %s' % status)
- if status == 'invalid':
- raise Error("Notarization failed")
- elif status == 'success':
- subprocess.run(['xcrun', 'stapler', 'staple', dmg])
- return
- time.sleep(30)
+class FlatpakTarget(Target):
+ def __init__(self, project, checkout, work):
+ super(FlatpakTarget, self).__init__('flatpak')
+ self.build_dependencies = False
+ self.project = project
+ self.checkout = checkout
+ # If we use git references we end up with a checkout in one mount trying
+ # to link to the git reference repo in other, which doesn't work.
+ globals.use_git_reference = False
+ if config.has('flatpak_state_dir'):
+ self.mount(config.get('flatpak_state_dir'))