diff options
author | Yong Tang <yong.tang.github@outlook.com> | 2018-01-19 19:06:49 +0000 |
---|---|---|
committer | Yong Tang <yong.tang.github@outlook.com> | 2018-01-19 19:10:36 +0000 |
commit | 5410ef84e7cb6a7a666d0c5b2fc65bee301d4da6 (patch) | |
tree | 46b185a5fcac22eb7fe92d5ebde106080a89bd44 /third_party/git | |
parent | e2a2194cd746a0f11e97d315ee870fd7e10fd62d (diff) |
Update dependency rules in Bazel
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'third_party/git')
-rw-r--r-- | third_party/git/git_configure.bzl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/third_party/git/git_configure.bzl b/third_party/git/git_configure.bzl index fdf1c0c36a..8e2839bdc2 100644 --- a/third_party/git/git_configure.bzl +++ b/third_party/git/git_configure.bzl @@ -5,7 +5,6 @@ * `PYTHON_BIN_PATH`: location of python binary. """ -_TF_CONFIG_TIME = "TF_CONFIG_TIME" _PYTHON_BIN_PATH = "PYTHON_BIN_PATH" def _fail(msg): @@ -39,6 +38,11 @@ def _git_conf_impl(repository_ctx): Label("@org_tensorflow//tensorflow/tools/git:gen_git_source.py")) generated_files_path = repository_ctx.path("gen") + r = repository_ctx.execute( + ["test", "-f", "%s/.git/logs/HEAD" % tensorflow_root_path]) + if r.return_code == 0: + unused_var = repository_ctx.path(Label("//:.git/HEAD")) # pylint: disable=unused-variable + result = repository_ctx.execute([ _get_python_bin(repository_ctx), python_script_path, "--configure", tensorflow_root_path, @@ -51,7 +55,6 @@ def _git_conf_impl(repository_ctx): git_configure = repository_rule( implementation = _git_conf_impl, environ = [ - _TF_CONFIG_TIME, _PYTHON_BIN_PATH, ], ) |