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

Side by Side Diff: build/config/ios/find_signing_identity.py

Issue 2392643003: Removes files from //build that we don't need (Closed)
Patch Set: Created 4 years, 2 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
2 # Copyright (c) 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import subprocess
7 import sys
8 import re
9
10 def ListIdentities():
11 return subprocess.check_output([
12 '/usr/bin/env',
13 'xcrun',
14 'security',
15 'find-identity',
16 '-v',
17 '-p',
18 'codesigning',
19 ]).strip()
20
21
22 def FindValidIdentity():
23 lines = ListIdentities().splitlines()
24 # Look for something like "2) XYZ "iPhone Developer: Name (ABC)""
25 exp = re.compile('.*\) ([A-F|0-9]*)(.*)')
26 for line in lines:
27 res = exp.match(line)
28 if res is None:
29 continue
30 if "iPhone Developer: Google Development" in res.group(2):
31 return res.group(1)
32 return ""
33
34
35 if __name__ == '__main__':
36 print FindValidIdentity()
OLDNEW
« 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