Merge "Bazel: Use version check function from bazel-skylib repository"
This commit is contained in:
15
WORKSPACE
15
WORKSPACE
@@ -1,13 +1,16 @@
|
||||
workspace(name = "gerrit")
|
||||
|
||||
load("//:version.bzl", "check_version")
|
||||
|
||||
check_version("0.5.3")
|
||||
|
||||
load("//tools/bzl:maven_jar.bzl", "maven_jar", "GERRIT", "MAVEN_LOCAL")
|
||||
load("//lib/codemirror:cm.bzl", "CM_VERSION", "DIFF_MATCH_PATCH_VERSION")
|
||||
load("//plugins:external_plugin_deps.bzl", "external_plugin_deps")
|
||||
|
||||
http_archive(
|
||||
name = "bazel_skylib",
|
||||
sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d",
|
||||
strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b",
|
||||
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "io_bazel_rules_closure",
|
||||
sha256 = "25f5399f18d8bf9ce435f85c6bbf671ec4820bc4396b3022cc5dc4bc66303609",
|
||||
@@ -24,6 +27,10 @@ http_file(
|
||||
url = "https://raw.githubusercontent.com/google/closure-compiler/775609aad61e14aef289ebec4bfc09ad88877f9e/contrib/externs/polymer-1.0.js",
|
||||
)
|
||||
|
||||
load("@bazel_skylib//:lib.bzl", "versions")
|
||||
|
||||
versions.check(minimum_bazel_version = "0.7.0")
|
||||
|
||||
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")
|
||||
|
||||
# Prevent redundant loading of dependencies.
|
||||
|
||||
@@ -3,10 +3,3 @@
|
||||
# when talking to the destination repository.
|
||||
#
|
||||
GERRIT_VERSION = "2.16-SNAPSHOT"
|
||||
|
||||
def check_version(x):
|
||||
if native.bazel_version == "":
|
||||
# experimental / unreleased Bazel.
|
||||
return
|
||||
if native.bazel_version < x:
|
||||
fail("\nERROR: Current Bazel version is {}, expected at least {}\n".format(native.bazel_version, x))
|
||||
|
||||
Reference in New Issue
Block a user