Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: build/config/ios/find_signing_identity.py

Issue 2835893004: [ios] Add support for filtering codesiging identity. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/ios/ios_sdk.gni » ('j') | build/config/ios/ios_sdk.gni » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/ios/find_signing_identity.py
diff --git a/build/config/ios/find_signing_identity.py b/build/config/ios/find_signing_identity.py
index 736e2e4b5c919d96267da27a7ddb3aec4d0b7341..7add474b9c3723a05830d27efb9da3c62cee895a 100644
--- a/build/config/ios/find_signing_identity.py
+++ b/build/config/ios/find_signing_identity.py
@@ -19,7 +19,7 @@ def ListIdentities():
])
-def FindValidIdentity():
+def FindValidIdentity(identity_description):
lines = list(map(str.strip, ListIdentities().splitlines()))
# Look for something like "2) XYZ "iPhone Developer: Name (ABC)""
exp = re.compile('[0-9]+\) ([A-F0-9]+) "([^"]*)"')
@@ -27,17 +27,21 @@ def FindValidIdentity():
res = exp.match(line)
if res is None:
continue
- if "iPhone Developer" in res.group(2):
- return res.group(1)
- return ""
+ if identity_description in res.group(2):
+ yield res.group(1)
if __name__ == '__main__':
parser = argparse.ArgumentParser('codesign iOS bundles')
- parser.add_argument('--developer_dir', required=False,
- help='Path to Xcode.')
+ parser.add_argument(
+ '--developer_dir', required=False,
+ help='Path to Xcode.')
+ parser.add_argument(
+ '--identity-description', required=True,
+ help='Text description used to select the code signing identity.')
args = parser.parse_args()
if args.developer_dir:
os.environ['DEVELOPER_DIR'] = args.developer_dir
- print FindValidIdentity()
+ for identity in FindValidIdentity(args.identity_description):
+ print identity
« no previous file with comments | « no previous file | build/config/ios/ios_sdk.gni » ('j') | build/config/ios/ios_sdk.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698