diff options
author | Patrick Nguyen <drpng@google.com> | 2017-12-28 16:04:42 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-12-28 16:08:58 -0800 |
commit | 20765b3e1ae3b718699592c98aa9805cb874b6d1 (patch) | |
tree | b429a74cd0046404644f34cc8fe6ff2cab78bb85 /tensorflow/tools/git | |
parent | 2e2715baa84720f786b38d1f9cb6887399020d6f (diff) |
Merge changes from github.
PiperOrigin-RevId: 180301735
Diffstat (limited to 'tensorflow/tools/git')
-rwxr-xr-x | tensorflow/tools/git/gen_git_source.py | 16 |
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) |