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

Unified Diff: build/generate_version.py

Issue 856323002: Restrict tag-update for version generation to cached git repos. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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: build/generate_version.py
diff --git a/build/generate_version.py b/build/generate_version.py
index 785284281f09ba1b0b71011b083cb213cc1634b7..3f113782068e833935e3d932f1beafd91b70e6c6 100755
--- a/build/generate_version.py
+++ b/build/generate_version.py
@@ -28,11 +28,16 @@ VERSION_GEN_CC = os.path.join(CWD, "src", "version_gen.cc")
def generate_version_file():
- # Make sure the tags are fetched.
- subprocess.check_output(
- "git fetch origin +refs/tags/*:refs/tags/*",
+ # Make sure the tags are fetched from cached git repos.
+ url = subprocess.check_output(
+ "git config --get remote.origin.url",
shell=True,
- cwd=CWD)
+ cwd=CWD).strip()
+ if not url.startswith("http"):
+ subprocess.check_output(
+ "git fetch origin +refs/tags/*:refs/tags/*",
+ shell=True,
+ cwd=CWD)
tag = subprocess.check_output(
"git describe --tags",
shell=True,
« 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