diff options
author | Andrew Selle <aselle@google.com> | 2016-09-06 08:19:04 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-09-06 09:32:49 -0700 |
commit | 09045e49d1e2d3322e8ca8cc40f0e5db10f13c58 (patch) | |
tree | 9719630c193394b16064f18a97cc571020c8c0ad /tensorflow/tools/git/BUILD | |
parent | 8aa6d5fa256cac93fd9a88b3560599c6d103d657 (diff) |
Include sha hash in python variable __version__
It is necessary to symlink in files from .git/ in order to make
bazel aware of changes to the current head. As it is this is not
completely reliable when git repositories are in a dirty index
state. First class support for bazel git a reported bug but
not a high priority.
./configure sets up the symlinks by calling the gen_git_source.py
a bazel genrule calls gen_git_source.py to generate version_info.cc
Also changed cmake and make to build this properly.
Change: 132328009
Diffstat (limited to 'tensorflow/tools/git/BUILD')
-rw-r--r-- | tensorflow/tools/git/BUILD | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tensorflow/tools/git/BUILD b/tensorflow/tools/git/BUILD new file mode 100644 index 0000000000..f502c8dde0 --- /dev/null +++ b/tensorflow/tools/git/BUILD @@ -0,0 +1,28 @@ +# Description: +# Contains script to generate tensorflow/core/util/version_info.cc +# Also contains information about git repository deposited by configure +# in gen/... +package(default_visibility = ["//tensorflow:internal"]) + +licenses(["notice"]) # Apache 2.0 + +exports_files( + glob(["gen/*"]) + [ + "gen_git_source.py", + ], +) + +# ----------------------------------------------------------------------------- +# Google-internal targets. These must be at the end for syncrepo. + +filegroup( + name = "all_files", + srcs = glob( + ["**/*"], + exclude = [ + "**/METADATA", + "**/OWNERS", + ], + ), + visibility = ["//tensorflow:__subpackages__"], +) |