Commit bc70271a authored by Ivan Bogatyy's avatar Ivan Bogatyy Committed by calberti
Browse files

Fix Bazel version check (#1069)

parent 87a8abd4
...@@ -6,8 +6,7 @@ local_repository( ...@@ -6,8 +6,7 @@ local_repository(
load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace") load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace")
tf_workspace(path_prefix="", tf_repo_name="org_tensorflow") tf_workspace(path_prefix="", tf_repo_name="org_tensorflow")
# Test that Bazel is the correct release, tested for compatibility with the # Test that Bazel is up-to-date.
# current SyntaxNet snapshot. load("@org_tensorflow//tensorflow:workspace.bzl", "check_version")
load("//syntaxnet:syntaxnet.bzl", "check_version")
check_version("0.4.3") check_version("0.4.3")
...@@ -16,14 +16,6 @@ ...@@ -16,14 +16,6 @@
load("@protobuf//:protobuf.bzl", "cc_proto_library") load("@protobuf//:protobuf.bzl", "cc_proto_library")
load("@protobuf//:protobuf.bzl", "py_proto_library") load("@protobuf//:protobuf.bzl", "py_proto_library")
def check_version(expected_version):
current_version = native.bazel_version.split(" ")[0].split("-")[0]
if current_version != expected_version:
fail("\nCurrent Bazel version is {}, expected {}.\n".format(
current_version, expected_version) +
"To try anyway, remove check_version() call from syntaxnet/WORKSPACE")
else:
print("Bazel OK")
def if_cuda(if_true, if_false = []): def if_cuda(if_true, if_false = []):
"""Shorthand for select()'ing on whether we're building with CUDA.""" """Shorthand for select()'ing on whether we're building with CUDA."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment