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

Side by Side Diff: go/bootstrap.py

Issue 1364983002: Add CIPD binary installation to DEPS runhooks. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Use "cipd_package_root/" instead of "bin/", better class grouping. Created 5 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
« .gitignore ('K') | « data/cacert.pem ('k') | 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 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 """Prepares a local hermetic Go installation. 6 """Prepares a local hermetic Go installation.
7 7
8 - Downloads and unpacks the Go toolset in ../../golang. 8 - Downloads and unpacks the Go toolset in ../../golang.
9 - Downloads and installs goop and golint. 9 - Downloads and installs goop and golint.
10 - Fetches code dependencies via goop. 10 - Fetches code dependencies via goop.
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 for d in ['infra', 'infra_internal']: 465 for d in ['infra', 'infra_internal']:
466 if p.startswith(os.path.join(gclient_root, d, 'go')): 466 if p.startswith(os.path.join(gclient_root, d, 'go')):
467 return False 467 return False
468 return True 468 return True
469 path = filter(should_keep, path) 469 path = filter(should_keep, path)
470 470
471 # New PATH entries. 471 # New PATH entries.
472 paths_to_add = [ 472 paths_to_add = [
473 os.path.join(env['GOROOT'], 'bin'), 473 os.path.join(env['GOROOT'], 'bin'),
474 env.get('GOBIN'), 474 env.get('GOBIN'),
475 os.path.join(ROOT, 'cipd_package_root', 'bin'),
475 ] 476 ]
476 paths_to_add.extend(os.path.join(p, '.vendor', 'bin') for p in vendor_paths) 477 paths_to_add.extend(os.path.join(p, '.vendor', 'bin') for p in vendor_paths)
477 if go_appengine_path: 478 if go_appengine_path:
478 paths_to_add.append(go_appengine_path) 479 paths_to_add.append(go_appengine_path)
479 480
480 # Make sure not to add duplicates entries to PATH over and over again when 481 # Make sure not to add duplicates entries to PATH over and over again when
481 # get_go_environ is invoked multiple times. 482 # get_go_environ is invoked multiple times.
482 paths_to_add = [p for p in paths_to_add if p and p not in path] 483 paths_to_add = [p for p in paths_to_add if p and p not in path]
483 env['PATH'] = os.pathsep.join(paths_to_add + path) 484 env['PATH'] = os.pathsep.join(paths_to_add + path)
484 485
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 'Linux') 643 'Linux')
643 644
644 bootstrap([WORKSPACE], logging.DEBUG, toolset=opts.toolset) 645 bootstrap([WORKSPACE], logging.DEBUG, toolset=opts.toolset)
645 if opts.build_cross: 646 if opts.build_cross:
646 build_cross_toolset(opts.toolset) 647 build_cross_toolset(opts.toolset)
647 return 0 648 return 0
648 649
649 650
650 if __name__ == '__main__': 651 if __name__ == '__main__':
651 sys.exit(main(sys.argv[1:])) 652 sys.exit(main(sys.argv[1:]))
OLDNEW
« .gitignore ('K') | « data/cacert.pem ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698