diff options
| author | ruki <[email protected]> | 2020-04-10 23:07:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-10 12:43:39 +0800 |
| commit | 382a874962650828a0c17c061f83c7b6b80f41a4 (patch) | |
| tree | afc8b52d34f85273aae6b1f8b01b6dc8707714bc /xmake/modules/private/tools/codesign.lua | |
| parent | 25d905078455734a7a6f664223890f938add303b (diff) | |
add codesign.mobile_provisions
Diffstat (limited to 'xmake/modules/private/tools/codesign.lua')
| -rw-r--r-- | xmake/modules/private/tools/codesign.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xmake/modules/private/tools/codesign.lua b/xmake/modules/private/tools/codesign.lua index 1517c72b0..3f068cfbc 100644 --- a/xmake/modules/private/tools/codesign.lua +++ b/xmake/modules/private/tools/codesign.lua @@ -49,6 +49,20 @@ function codesign_identities() return identities or nil end +-- get provision profiles only for mobile +function mobile_provisions() + local mobile_provisions = _g.mobile_provisions + if mobile_provisions == nil then + mobile_provisions = {} + local files = os.files("~/Library/MobileDevice/Provisioning Profiles/*.mobileprovision") + for _, file in ipairs(files) do + mobile_provisions[path.basename(file)] = file + end + _g.mobile_provisions = mobile_provisions or false + end + return mobile_provisions or nil +end + -- main entry function main (programdir, codesign_identity) @@ -79,6 +93,11 @@ function main (programdir, codesign_identity) local argv = {"--force", "--timestamp=none"} table.insert(argv, "--sign") table.insert(argv, sign) + local entitlements -- TODO + if entitlements then + table.insert(argv, "--entitlements") + table.insert(argv, entitlements) + end table.insert(argv, programdir) os.vrunv(codesign.program, argv, {envs = {CODESIGN_ALLOCATE = codesign_allocate}}) end |
