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

Side by Side Diff: scripts/slave/ios/find_xcode.py

Issue 950973002: Temporarily make find_xcode.py prefix match on the tryserver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Switch to the given Xcode version. 6 """Switch to the given Xcode version.
7 7
8 Usage: 8 Usage:
9 ./find_xcode.py -j /tmp/out.json -v 6.0.1 9 ./find_xcode.py -j /tmp/out.json -v 6.0.1
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 xcodebuild = get_xcodebuild_path(app) 132 xcodebuild = get_xcodebuild_path(app)
133 133
134 if os.path.exists(xcodebuild): 134 if os.path.exists(xcodebuild):
135 version, build_version = get_xcode_version(xcodebuild) 135 version, build_version = get_xcode_version(xcodebuild)
136 136
137 xcode_info['installations'][installation_path] = "%s (%s)" % ( 137 xcode_info['installations'][installation_path] = "%s (%s)" % (
138 version, 138 version,
139 build_version, 139 build_version,
140 ) 140 )
141 141
142 if version == target_version: 142 # TODO(smut): Remove prefix matching hack when http://crbug.com/461005
143 xcode_info['matches'][installation_path] = "%s (%s)" % ( 143 # is fixed.
144 version, 144 if os.environ.get('BUILDBOT_MASTERNAME') == 'tryserver.chromium.mac':
145 build_version, 145 if version.startswith(target_version):
146 ) 146 xcode_info['matches'][installation_path] = "%s (%s)" % (
147 version,
148 build_version,
149 )
150 else:
151 if version == target_version:
152 xcode_info['matches'][installation_path] = "%s (%s)" % (
153 version,
154 build_version,
155 )
147 156
148 # If this is the first match, switch to it. 157 # If this is the first match, switch to it.
149 if not xcode_info['found']: 158 if not xcode_info['found']:
150 utils.call( 159 utils.call(
151 'sudo', 160 'sudo',
152 'xcode-select', 161 'xcode-select',
153 '-switch', 162 '-switch',
154 os.path.join('/', 'Applications', app), 163 os.path.join('/', 'Applications', app),
155 ) 164 )
156 165
(...skipping 26 matching lines...) Expand all
183 parser.add_argument( 192 parser.add_argument(
184 '-v', 193 '-v',
185 '--version', 194 '--version',
186 help='Xcode version to find and switch to.', 195 help='Xcode version to find and switch to.',
187 metavar='ver', 196 metavar='ver',
188 required=True, 197 required=True,
189 type=str, 198 type=str,
190 ) 199 )
191 200
192 sys.exit(main(parser.parse_args())) 201 sys.exit(main(parser.parse_args()))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698