Bazel: Remove version check
Recent Bazel releases perform Bazel version check, based on .bazelversion file. Change-Id: I92d5daaef8ecbd011517d314564c0f5492c8ea75
This commit is contained in:
parent
132ba05c82
commit
8227098d7d
16
WORKSPACE
16
WORKSPACE
|
@ -2,22 +2,6 @@ workspace(name = "jgit")
|
|||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
http_archive(
|
||||
name = "bazel_skylib",
|
||||
sha256 = "2ea8a5ed2b448baf4a6855d3ce049c4c452a6470b1efd1504fdb7c1c134d220a",
|
||||
strip_prefix = "bazel-skylib-0.8.0",
|
||||
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/0.8.0.tar.gz"],
|
||||
)
|
||||
|
||||
# Check Bazel version when invoked by Bazel directly
|
||||
load("//tools:bazelisk_version.bzl", "bazelisk_version")
|
||||
|
||||
bazelisk_version(name = "bazelisk_version")
|
||||
|
||||
load("@bazelisk_version//:check.bzl", "check_bazel_version")
|
||||
|
||||
check_bazel_version()
|
||||
|
||||
load("//tools:bazlets.bzl", "load_bazlets")
|
||||
|
||||
load_bazlets(commit = "f30a992da9fc855dce819875afb59f9dd6f860cd")
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
_template = """
|
||||
load("@bazel_skylib//lib:versions.bzl", "versions")
|
||||
|
||||
def check_bazel_version():
|
||||
versions.check(minimum_bazel_version = "{version}")
|
||||
""".strip()
|
||||
|
||||
def _impl(repository_ctx):
|
||||
repository_ctx.symlink(Label("@//:.bazelversion"), ".bazelversion")
|
||||
bazelversion = repository_ctx.read(".bazelversion").strip()
|
||||
|
||||
repository_ctx.file("BUILD", executable = False)
|
||||
|
||||
repository_ctx.file("check.bzl", executable = False, content = _template.format(version = bazelversion))
|
||||
|
||||
bazelisk_version = repository_rule(implementation = _impl)
|
Loading…
Reference in New Issue