Skylib module containing functions for checking Bazel versions.

Macros and Functions

versions.get

Returns the current Bazel version

versions.parse

Parses a version string into a 3-tuple of ints

int tuples can be compared directly using binary operators (<, >).

bazel_version

the Bazel version string

versions.check

Check that the version of Bazel is valid within the specified range.

minimum_bazel_version

minimum version of Bazel expected

maximum_bazel_version

maximum version of Bazel expected

bazel_version

the version of Bazel to check. Used for testing, defaults to native.bazel_version

versions.is_at_most

Check that a version is lower or equals to a threshold.

threshold

the maximum version string

version

the version string to be compared to the threshold

versions.is_at_least

Check that a version is higher or equals to a threshold.

threshold

the minimum version string

version

the version string to be compared to the threshold