21 "--deep",
"--force",
"--verify",
"--verbose",
"--timestamp",
22 "--options",
"runtime",
"--sign", identity
25 name = os.path.basename(binary)
32 entitlements_file = os.path.join(SCRIPT_DIR,
"entitlements",
34 if os.path.exists(entitlements_file):
35 codesign_args += [
"--entitlements", entitlements_file]
36 cmd = [
"codesign"] + codesign_args + [binary]
37 result = subprocess.run(cmd, capture_output=
True, encoding=
"utf8")
38 if result.returncode != 0:
39 print(
"failed to run: " +
" ".join(cmd))
40 print(f
"exit code: {result.returncode}")
45 raise Exception(
"failed to codesign")