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

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

Issue 2023703002: Beginning work on GN build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Really add //build. Add dart_bootstrap rule. 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 unified diff | Download patch
« no previous file with comments | « build/config/ios/OWNERS ('k') | build/config/ios/ios_sdk.gni » ('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 # 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 subprocess
6 import sys
7 import re
8
9 def ListIdentities():
10 return subprocess.check_output([
11 '/usr/bin/env',
12 'xcrun',
13 'security',
14 'find-identity',
15 '-v',
16 '-p',
17 'codesigning',
18 ]).strip()
19
20
21 def FindValidIdentity():
22 lines = ListIdentities().splitlines()
23 # Look for something like "2) XYZ "iPhone Developer: Name (ABC)""
24 exp = re.compile('[0-9]+\) ([A-F0-9]+) "([^"]*)"')
25 for line in lines:
26 res = exp.match(line)
27 if res is None:
28 continue
29 if "iPhone Developer" in res.group(2):
30 return res.group(1)
31 return ""
32
33
34 if __name__ == '__main__':
35 print FindValidIdentity()
OLDNEW
« no previous file with comments | « build/config/ios/OWNERS ('k') | build/config/ios/ios_sdk.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698