OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The LUCI Authors. All rights reserved. | 2 # Copyright 2015 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
5 | 5 |
6 """Tool to interact with recipe repositories. | 6 """Tool to interact with recipe repositories. |
7 | 7 |
8 This tool operates on the nearest ancestor directory containing an | 8 This tool operates on the nearest ancestor directory containing an |
9 infra/config/recipes.cfg. | 9 infra/config/recipes.cfg. |
10 """ | 10 """ |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 parser.add_argument( | 394 parser.add_argument( |
395 '--deps-path', | 395 '--deps-path', |
396 help='Path where recipe engine dependencies will be extracted.') | 396 help='Path where recipe engine dependencies will be extracted.') |
397 parser.add_argument( | 397 parser.add_argument( |
398 '--verbose', '-v', action='count', | 398 '--verbose', '-v', action='count', |
399 help='Increase logging verboisty') | 399 help='Increase logging verboisty') |
400 # TODO(phajdan.jr): Figure out if we need --no-fetch; remove if not. | 400 # TODO(phajdan.jr): Figure out if we need --no-fetch; remove if not. |
401 parser.add_argument( | 401 parser.add_argument( |
402 '--no-fetch', action='store_true', | 402 '--no-fetch', action='store_true', |
403 help='Disable automatic fetching') | 403 help='Disable automatic fetching') |
404 parser.add_argument( | |
405 '--bootstrap-script', | |
406 help='Path to the script used to bootstrap this tool (internal use only)') | |
407 parser.add_argument('-O', '--project-override', metavar='ID=PATH', | 404 parser.add_argument('-O', '--project-override', metavar='ID=PATH', |
408 action=ProjectOverrideAction, | 405 action=ProjectOverrideAction, |
409 help='Override a project repository path with a local one.') | 406 help='Override a project repository path with a local one.') |
410 parser.add_argument( | 407 parser.add_argument( |
411 '--use-bootstrap', action='store_true', | 408 '--use-bootstrap', action='store_true', |
412 help='Use bootstrap/bootstrap.py to create a isolated python virtualenv' | 409 help='Use bootstrap/bootstrap.py to create a isolated python virtualenv' |
413 ' with required python dependencies.') | 410 ' with required python dependencies.') |
414 parser.add_argument( | 411 parser.add_argument( |
415 '--operational-args-path', action='store', | 412 '--operational-args-path', action='store', |
416 help='The path to an operational Arguments file. If provided, this file ' | 413 help='The path to an operational Arguments file. If provided, this file ' |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 652 |
656 if not isinstance(ret, int): | 653 if not isinstance(ret, int): |
657 if ret is None: | 654 if ret is None: |
658 ret = 0 | 655 ret = 0 |
659 else: | 656 else: |
660 print >> sys.stderr, ret | 657 print >> sys.stderr, ret |
661 ret = 1 | 658 ret = 1 |
662 sys.stdout.flush() | 659 sys.stdout.flush() |
663 sys.stderr.flush() | 660 sys.stderr.flush() |
664 os._exit(ret) | 661 os._exit(ret) |
OLD | NEW |