| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import argparse | 5 import argparse |
| 6 import datetime | 6 import datetime |
| 7 import fnmatch | 7 import fnmatch |
| 8 import glob | 8 import glob |
| 9 import os | 9 import os |
| 10 import plistlib | 10 import plistlib |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 info_plist = LoadPlistFile(args.info_plist) | 407 info_plist = LoadPlistFile(args.info_plist) |
| 408 bundle_identifier = info_plist['CFBundleIdentifier'] | 408 bundle_identifier = info_plist['CFBundleIdentifier'] |
| 409 provisioning_profile = FindProvisioningProfile(bundle_identifier, False) | 409 provisioning_profile = FindProvisioningProfile(bundle_identifier, False) |
| 410 entitlements = GenerateEntitlements( | 410 entitlements = GenerateEntitlements( |
| 411 args.entitlements_path, provisioning_profile, bundle_identifier) | 411 args.entitlements_path, provisioning_profile, bundle_identifier) |
| 412 entitlements.WriteTo(args.path) | 412 entitlements.WriteTo(args.path) |
| 413 | 413 |
| 414 | 414 |
| 415 def Main(): | 415 def Main(): |
| 416 parser = argparse.ArgumentParser('codesign iOS bundles') | 416 parser = argparse.ArgumentParser('codesign iOS bundles') |
| 417 parser.add_argument('--developer_dir', required=False, |
| 418 help='Path to Xcode.') |
| 417 subparsers = parser.add_subparsers() | 419 subparsers = parser.add_subparsers() |
| 418 | 420 |
| 419 actions = [ | 421 actions = [ |
| 420 CodeSignBundleAction, | 422 CodeSignBundleAction, |
| 421 CodeSignFileAction, | 423 CodeSignFileAction, |
| 422 GenerateEntitlementsAction, | 424 GenerateEntitlementsAction, |
| 423 ] | 425 ] |
| 424 | 426 |
| 425 for action in actions: | 427 for action in actions: |
| 426 action.Register(subparsers) | 428 action.Register(subparsers) |
| 427 | 429 |
| 428 args = parser.parse_args() | 430 args = parser.parse_args() |
| 431 if args.developer_dir: |
| 432 os.environ['DEVELOPER_DIR'] = args.developer_dir |
| 429 args.func(args) | 433 args.func(args) |
| 430 | 434 |
| 431 | 435 |
| 432 if __name__ == '__main__': | 436 if __name__ == '__main__': |
| 433 sys.exit(Main()) | 437 sys.exit(Main()) |
| OLD | NEW |