Skip to content

Commit 76c681d

Browse files
watwarsmeta-codesync[bot]
authored andcommitted
pass --verify-entitlements to assemble_bundle if flag is present
Summary: Pass --verify-entitlements to assemble_bundle.py if the attribute is present and set to true. In a later diff, we will actually call check_entitlements.py from assemble_bundle when the flag is passed. Reviewed By: milend Differential Revision: D91254251 fbshipit-source-id: be988a7717af9b2d0a038f561b00087087cceb73
1 parent 444fbc9 commit 76c681d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

prelude/apple/apple_bundle_part.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,16 @@ def assemble_bundle(
219219
codesign_manifest.as_output(),
220220
]
221221

222+
verify_entitlements_args = ["--verify-entitlements"] if ctx.attrs.entitlements_verification_check_enabled else []
223+
222224
command = cmd_args(
223225
[
224226
tool,
225227
"--output",
226228
bundle.as_output(),
227229
"--spec",
228230
spec_file,
229-
] + codesign_args + codesign_bundle_extra_args + platform_args + swift_args,
231+
] + codesign_args + codesign_bundle_extra_args + verify_entitlements_args + platform_args + swift_args,
230232
hidden =
231233
[part.source for part in all_parts] +
232234
[part.codesign_entitlements for part in all_parts if part.codesign_entitlements] +

prelude/apple/tools/bundling/main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ def _args_parser() -> argparse.ArgumentParser:
196196
action="store_true",
197197
help="Create symlinks for versioned macOS bundle",
198198
)
199+
parser.add_argument(
200+
"--verify-entitlements",
201+
action="store_true",
202+
help="Verify that the bundle's entitlements match the provisioning profile",
203+
)
199204

200205
add_args_for_signing_context(parser)
201206

0 commit comments

Comments
 (0)