20 codesign_args = [
21 "--deep", "--force", "--verify", "--verbose", "--timestamp",
22 "--options", "runtime", "--sign", identity
23 ]
24
25 name = os.path.basename(binary)
26
27
28
29
30
31
32 entitlements_file = os.path.join(SCRIPT_DIR, "entitlements",
33 name + ".plist")
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:
40 print(f
"exit code: {result.returncode}")
45 raise Exception("failed to codesign")
46
47
def SignBinary(identity, binary)
def print(*args, **kwargs)
static SkString join(const CommandLineFlags::StringArray &)