aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/git/gen_git_source.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/tools/git/gen_git_source.py')
-rwxr-xr-xtensorflow/tools/git/gen_git_source.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/tensorflow/tools/git/gen_git_source.py b/tensorflow/tools/git/gen_git_source.py
index 3630dbd740..f2845c877f 100755
--- a/tensorflow/tools/git/gen_git_source.py
+++ b/tensorflow/tools/git/gen_git_source.py
@@ -16,10 +16,7 @@
"""Help include git hash in tensorflow bazel build.
This creates symlinks from the internal git repository directory so
-that the build system can see changes in the version state. We also
-remember what branch git was on so when the branch changes we can
-detect that the ref file is no longer correct (so we can suggest users
-run ./configure again).
+that the build system can see changes in the version state.
NOTE: this script is only used in opensource.
@@ -221,13 +218,14 @@ def generate(arglist):
if not data["git"]:
git_version = b"unknown"
else:
- old_branch = data["branch"]
+ old_branch = data["branch"]
new_branch = parse_branch_ref(head_symlink)
if new_branch != old_branch:
- raise RuntimeError(
- "Run ./configure again, branch was '%s' but is now '%s'" %
- (old_branch, new_branch))
- git_version = get_git_version(data["path"])
+ print("Warning, run ./configure again, to get __git_version__ to record "
+ "correct version")
+ git_version = get_git_version(data["path"])+'-inconsistent-git-version'
+ else:
+ git_version = get_git_version(data["path"])
write_version_info(dest_file, git_version)