From 8227098d7daa08572432faf28422ffc04d0e6483 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Mon, 10 Jan 2022 21:55:08 +0100 Subject: [PATCH] Bazel: Remove version check Recent Bazel releases perform Bazel version check, based on .bazelversion file. Change-Id: I92d5daaef8ecbd011517d314564c0f5492c8ea75 --- WORKSPACE | 16 ---------------- tools/bazelisk_version.bzl | 16 ---------------- 2 files changed, 32 deletions(-) delete mode 100644 tools/bazelisk_version.bzl diff --git a/WORKSPACE b/WORKSPACE index 70206db831..a39f0a845f 100644 --- 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 index d8b3d10982..0000000000 --- a/tools/bazelisk_version.bzl +++ /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) -- 2.39.5