If there is an error, stop the signing process.

This commit is contained in:
Adam Treat 2023-04-26 09:22:02 -04:00
parent 9278265693
commit 8d421c1ff6

View File

@ -39,6 +39,7 @@ def sign_dmg(input_dmg, output_dmg, signing_identity):
exit(1)
# Sign the .app bundle
try:
subprocess.run([
'codesign',
'--deep',
@ -48,7 +49,13 @@ def sign_dmg(input_dmg, output_dmg, signing_identity):
'--timestamp',
'--sign', signing_identity,
app_bundle
])
], check=True)
except subprocess.CalledProcessError as e:
print(f"Error during codesign: {e}")
# Clean up temporary directories
shutil.rmtree(temp_dir)
shutil.rmtree(mount_point)
exit(1)
# Create a new DMG containing the signed .app bundle
subprocess.run([