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

Side by Side Diff: doc/recipes.py

Issue 2867313002: [doc/recipes.py] fix issue when running recipes.py from . (Closed)
Patch Set: Created 3 years, 7 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 | « 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/env python 1 #!/usr/bin/env python
2 2
3 # Copyright 2017 The LUCI Authors. All rights reserved. 3 # Copyright 2017 The LUCI Authors. All rights reserved.
4 # Use of this source code is governed under the Apache License, Version 2.0 4 # Use of this source code is governed under the Apache License, Version 2.0
5 # that can be found in the LICENSE file. 5 # that can be found in the LICENSE file.
6 6
7 """Bootstrap script to clone and forward to the recipe engine tool. 7 """Bootstrap script to clone and forward to the recipe engine tool.
8 8
9 ******************* 9 *******************
10 ** DO NOT MODIFY ** 10 ** DO NOT MODIFY **
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 return engine_path 181 return engine_path
182 182
183 183
184 def main(): 184 def main():
185 if '--verbose' in sys.argv: 185 if '--verbose' in sys.argv:
186 logging.getLogger().setLevel(logging.INFO) 186 logging.getLogger().setLevel(logging.INFO)
187 187
188 repo_root = os.path.abspath( 188 repo_root = os.path.abspath(
189 _git_output(['rev-parse', '--show-toplevel'], 189 _git_output(['rev-parse', '--show-toplevel'],
190 cwd=os.path.dirname(__file__)).strip()) 190 cwd=os.path.abspath(os.path.dirname(__file__))).strip())
191 191
192 # TODO(iannucci): Actually make the location of recipes.cfg configurable. 192 # TODO(iannucci): Actually make the location of recipes.cfg configurable.
193 recipes_cfg_path = os.path.join(repo_root, 'infra', 'config', 'recipes.cfg') 193 recipes_cfg_path = os.path.join(repo_root, 'infra', 'config', 'recipes.cfg')
194 194
195 engine_path = checkout_engine(repo_root, recipes_cfg_path) 195 engine_path = checkout_engine(repo_root, recipes_cfg_path)
196 196
197 args = ['--package', recipes_cfg_path] + sys.argv[1:] 197 args = ['--package', recipes_cfg_path] + sys.argv[1:]
198 return _subprocess_call([ 198 return _subprocess_call([
199 sys.executable, '-u', 199 sys.executable, '-u',
200 os.path.join(engine_path, 'recipes.py')] + args) 200 os.path.join(engine_path, 'recipes.py')] + args)
201 201
202 202
203 if __name__ == '__main__': 203 if __name__ == '__main__':
204 sys.exit(main()) 204 sys.exit(main())
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