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

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

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 6 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 | « build/config/ios/XcodeHarness/FakeMain.m ('k') | build/config/ios/ios_app.py » ('j') | no next file with comments »
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
new file mode 100644
index 0000000000000000000000000000000000000000..2fe67f98e77c47f94491fae5609ff60a135da6de
--- /dev/null
+++ b/build/config/ios/find_signing_identity.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+# Copyright (c) 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import subprocess
+import sys
+import re
+
+def ListIdentities():
+ return subprocess.check_output([
+ '/usr/bin/env',
+ 'xcrun',
+ 'security',
+ 'find-identity',
+ '-v',
+ '-p',
+ 'codesigning',
+ ]).strip()
+
+
+def FindValidIdentity():
+ lines = ListIdentities().splitlines()
+ # Look for something like "2) XYZ "iPhone Developer: Name (ABC)""
+ exp = re.compile('.*\) ([A-F|0-9]*)(.*)')
+ for line in lines:
+ res = exp.match(line)
+ if res is None:
+ continue
+ if "iPhone Developer: Google Development" in res.group(2):
+ return res.group(1)
+ return ""
+
+
+if __name__ == '__main__':
+ print FindValidIdentity()
« no previous file with comments | « build/config/ios/XcodeHarness/FakeMain.m ('k') | build/config/ios/ios_app.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698