diff options
author | Jingwen Chen <jingwen@google.com> | 2018-01-12 18:42:22 -0500 |
---|---|---|
committer | Jingwen Chen <jingwen@google.com> | 2018-01-12 18:42:22 -0500 |
commit | b2a190832cb66230e128c476a86c4ba9aa6c479f (patch) | |
tree | e588bf516c106beff8e62c93f9370860e4c896d0 /protobuf.bzl | |
parent | 9f80df026933901883da1d556b38292e14836612 (diff) | |
download | protobuf-b2a190832cb66230e128c476a86c4ba9aa6c479f.tar.gz protobuf-b2a190832cb66230e128c476a86c4ba9aa6c479f.tar.bz2 protobuf-b2a190832cb66230e128c476a86c4ba9aa6c479f.zip |
Use versions module from Skylib for version checking
Diffstat (limited to 'protobuf.bzl')
-rw-r--r-- | protobuf.bzl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/protobuf.bzl b/protobuf.bzl index 6aed44a4..9e2600fb 100644 --- a/protobuf.bzl +++ b/protobuf.bzl @@ -1,3 +1,5 @@ +load("@bazel_skylib//:lib.bzl", "versions") + def _GetPath(ctx, path): if ctx.label.workspace_root: return ctx.label.workspace_root + '/' + path @@ -408,7 +410,4 @@ def check_protobuf_required_bazel_version(): This ensures bazel supports our approach to proto_library() depending on a copied filegroup. (Fixed in bazel 0.5.4) """ - expected = apple_common.dotted_version("0.5.4") - current = apple_common.dotted_version(native.bazel_version) - if current.compare_to(expected) < 0: - fail("Bazel must be newer than 0.5.4") + versions.check(minimum_bazel_version = "0.5.4") |