| OLD | NEW |
| (Empty) | |
| 1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import argparse |
| 6 import errno |
| 7 import os |
| 8 import subprocess |
| 9 import sys |
| 10 |
| 11 |
| 12 def PerformCodeSigning(args): |
| 13 return subprocess.check_call([ |
| 14 '/usr/bin/env', |
| 15 'xcrun', |
| 16 'codesign', |
| 17 '--entitlements', |
| 18 args.entitlements_path, |
| 19 '--sign', |
| 20 args.identity, |
| 21 '-f', |
| 22 args.application_path, |
| 23 ]) |
| 24 |
| 25 |
| 26 def main(): |
| 27 parser = argparse.ArgumentParser( |
| 28 description='Code sign the specified application') |
| 29 parser.add_argument('-p', dest='application_path', required=True, |
| 30 help='The application path') |
| 31 parser.add_argument('-i', dest='identity', required=True, |
| 32 help='The code signing identity to use') |
| 33 parser.add_argument('-e', dest='entitlements_path', required=True, |
| 34 help='The path to the entitlements .xcent') |
| 35 PerformCodeSigning(parser.parse_args()) |
| 36 |
| 37 |
| 38 if __name__ == '__main__': |
| 39 sys.exit(main()) |
| OLD | NEW |