1<!-- Generated with Stardoc: http://skydoc.bazel.build --> 2 3Skylib module containing functions for checking Bazel versions. 4 5<a id="#versions.get"></a> 6 7## versions.get 8 9<pre> 10versions.get() 11</pre> 12 13Returns the current Bazel version 14 15 16 17<a id="#versions.parse"></a> 18 19## versions.parse 20 21<pre> 22versions.parse(<a href="#versions.parse-bazel_version">bazel_version</a>) 23</pre> 24 25Parses a version string into a 3-tuple of ints 26 27int tuples can be compared directly using binary operators (<, >). 28 29 30**PARAMETERS** 31 32 33| Name | Description | Default Value | 34| :------------- | :------------- | :------------- | 35| <a id="versions.parse-bazel_version"></a>bazel_version | the Bazel version string | none | 36 37**RETURNS** 38 39An int 3-tuple of a (major, minor, patch) version. 40 41 42<a id="#versions.check"></a> 43 44## versions.check 45 46<pre> 47versions.check(<a href="#versions.check-minimum_bazel_version">minimum_bazel_version</a>, <a href="#versions.check-maximum_bazel_version">maximum_bazel_version</a>, <a href="#versions.check-bazel_version">bazel_version</a>) 48</pre> 49 50Check that the version of Bazel is valid within the specified range. 51 52**PARAMETERS** 53 54 55| Name | Description | Default Value | 56| :------------- | :------------- | :------------- | 57| <a id="versions.check-minimum_bazel_version"></a>minimum_bazel_version | minimum version of Bazel expected | none | 58| <a id="versions.check-maximum_bazel_version"></a>maximum_bazel_version | maximum version of Bazel expected | <code>None</code> | 59| <a id="versions.check-bazel_version"></a>bazel_version | the version of Bazel to check. Used for testing, defaults to native.bazel_version | <code>None</code> | 60 61 62<a id="#versions.is_at_most"></a> 63 64## versions.is_at_most 65 66<pre> 67versions.is_at_most(<a href="#versions.is_at_most-threshold">threshold</a>, <a href="#versions.is_at_most-version">version</a>) 68</pre> 69 70Check that a version is lower or equals to a threshold. 71 72**PARAMETERS** 73 74 75| Name | Description | Default Value | 76| :------------- | :------------- | :------------- | 77| <a id="versions.is_at_most-threshold"></a>threshold | the maximum version string | none | 78| <a id="versions.is_at_most-version"></a>version | the version string to be compared to the threshold | none | 79 80**RETURNS** 81 82True if version <= threshold. 83 84 85<a id="#versions.is_at_least"></a> 86 87## versions.is_at_least 88 89<pre> 90versions.is_at_least(<a href="#versions.is_at_least-threshold">threshold</a>, <a href="#versions.is_at_least-version">version</a>) 91</pre> 92 93Check that a version is higher or equals to a threshold. 94 95**PARAMETERS** 96 97 98| Name | Description | Default Value | 99| :------------- | :------------- | :------------- | 100| <a id="versions.is_at_least-threshold"></a>threshold | the minimum version string | none | 101| <a id="versions.is_at_least-version"></a>version | the version string to be compared to the threshold | none | 102 103**RETURNS** 104 105True if version >= threshold. 106 107 108