]> source.dussan.org Git - jgit.git/commitdiff
Bazel: Remove version check 56/189456/3
authorDavid Ostrovsky <david@ostrovsky.org>
Mon, 10 Jan 2022 20:55:08 +0000 (21:55 +0100)
committerDavid Ostrovsky <d.ostrovsky@gmx.de>
Thu, 20 Jan 2022 05:53:42 +0000 (00:53 -0500)
Recent Bazel releases perform Bazel version check, based on
.bazelversion file.

Change-Id: I92d5daaef8ecbd011517d314564c0f5492c8ea75

WORKSPACE
tools/bazelisk_version.bzl [deleted file]

index 70206db83160a9411b6bfd8b4493d444ca3df0c8..a39f0a845f5d2697bff7217964a3c4662926b5a9 100644 (file)
--- a/WORKSPACE
+++ b/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")
diff --git a/tools/bazelisk_version.bzl b/tools/bazelisk_version.bzl
deleted file mode 100644 (file)
index d8b3d10..0000000
+++ /dev/null
@@ -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)