Allow updaing on ox with signed/notarized app easily

This commit is contained in:
Kovid Goyal 2020-08-19 20:08:34 +05:30
parent 2fe1ef4774
commit 022e2eb1db
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -50,7 +50,10 @@ with open(__file__, 'rb') as f:
script = f.read().decode('utf-8')
script = script[:script.find('# EOF_REMOTE')].replace('if False:', 'if True:', 1)
with tempfile.NamedTemporaryFile(prefix='install-dmg-', suffix='.py') as f:
run('python ../bypy macos program --dont-strip')
cmd = 'python ../bypy macos program --dont-strip'
if sys.argv[-1] == 'sign':
cmd += ' --sign-installers --notarize'
run(cmd)
f.write(script.encode('utf-8'))
f.flush()
run(f'scp bypy/b/macos/dist/{dmg} {f.name} {HOST}:/tmp')