Restrict tag-update for version generation to cached git repos.

Otherwise it's impossible to compile v8 without internet
connection.

BUG=chromium:446166
LOG=n
NOTRY=true

Review URL: https://codereview.chromium.org/856323002

Cr-Commit-Position: refs/heads/master@{#26186}
This commit is contained in:
machenbach 2015-01-21 05:02:23 -08:00 committed by Commit bot
parent ee86227600
commit c6641e138b

View File

@ -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,