mirror of
https://github.com/bazelbuild/bazel-skylib
synced 2024-11-30 10:41:18 +00:00
6e30a77347
See https://github.com/bazelbuild/bazel-federation/pull/127 In particular, this allows us to use a modern Stardoc release to fix generated md docs. And we can remove internal_deps.bzl/internal_setup.bzl - it's unnecessary complexity needed only for deprecated Federation setup.
2.8 KiB
Executable file
2.8 KiB
Executable file
Skylib module containing functions for checking Bazel versions.
versions.get
versions.get()
Returns the current Bazel version
versions.parse
versions.parse(bazel_version)
Parses a version string into a 3-tuple of ints
int tuples can be compared directly using binary operators (<, >).
PARAMETERS
Name | Description | Default Value |
---|---|---|
bazel_version | the Bazel version string | none |
RETURNS
An int 3-tuple of a (major, minor, patch) version.
versions.check
versions.check(minimum_bazel_version, maximum_bazel_version, bazel_version)
Check that the version of Bazel is valid within the specified range.
PARAMETERS
versions.is_at_most
versions.is_at_most(threshold, version)
Check that a version is lower or equals to a threshold.
PARAMETERS
Name | Description | Default Value |
---|---|---|
threshold | the maximum version string | none |
version | the version string to be compared to the threshold | none |
RETURNS
True if version <= threshold.
versions.is_at_least
versions.is_at_least(threshold, version)
Check that a version is higher or equals to a threshold.
PARAMETERS
Name | Description | Default Value |
---|---|---|
threshold | the minimum version string | none |
version | the version string to be compared to the threshold | none |
RETURNS
True if version >= threshold.