Check Bazel version
Overview
We recommend forcing all users to update to at least the same version of Bazel as the continuous integration, so they don't trip over incompatibilities with rules used in the project.
check_bazel_version
check_bazel_version(minimum_bazel_version, message)
Verify the users Bazel version is at least the given one.
This should be called from the WORKSPACE
file so that the build fails as
early as possible. For example:
# in WORKSPACE:
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version")
check_bazel_version("0.11.0")
Attributes
minimum_bazel_version |
a string indicating the minimum version |
message |
optional string to print to your users, could be used to help them update |