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

Unified Diff: go/bootstrap.py

Issue 1134303002: Fix go bootstrap on Windows. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/bootstrap.py
diff --git a/go/bootstrap.py b/go/bootstrap.py
index 8b67cb7dd92c82ed80ae8de52a6b534d32bac637..3271cbfb10029d5629fe83cbf5677708cf884764 100755
--- a/go/bootstrap.py
+++ b/go/bootstrap.py
@@ -45,6 +45,9 @@ WORKSPACE = os.path.join(ROOT, 'go')
# Platform depended suffix for executable files.
EXE_SFX = '.exe' if sys.platform == 'win32' else ''
+# On Windows we use git from depot_tools.
+GIT_EXE = 'git.bat' if sys.platform == 'win32' else 'git'
+
# Pinned version of Go toolset to download.
TOOLSET_VERSION = 'go1.4'
@@ -273,7 +276,7 @@ def maybe_patch_appengine_sdk(toolset_root, go_appengine):
for p in os.listdir(os.path.join(WORKSPACE, 'patches'))
if p.endswith('.patch')]
for patch in patches:
- subprocess.check_call(['git', 'apply'], cwd=toolset_root,
+ subprocess.check_call([GIT_EXE, 'apply'], cwd=toolset_root,
stdin=open(patch), stdout=sys.stderr)
to_build = []
@@ -354,9 +357,8 @@ def ensure_tools_installed(toolset_root):
def fetch_tools_code(workspace, spec):
"""Fetches goop and golint source code with dependencies."""
- git_exe = 'git.bat' if sys.platform == 'win32' else 'git'
def git(cmd, cwd):
- subprocess.check_call([git_exe] + cmd, cwd=cwd, stdout=sys.stderr)
+ subprocess.check_call([GIT_EXE] + cmd, cwd=cwd, stdout=sys.stderr)
for path, repo in sorted(spec.iteritems()):
path = os.path.join(workspace, path.replace('/', os.sep))
os.makedirs(path)
« 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