Repository navigation
Expand file tree
/
Copy pathcheck_bazel_version.html
More file actions
231 lines (207 loc) · 7.19 KB
/
Copy pathcheck_bazel_version.html
File metadata and controls
231 lines (207 loc) · 7.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!--
Documentation generated by Skydoc
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Check Bazel version</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.1.1/material.green-light_blue.min.css">
<script defer src="https://code.getmdl.io/1.1.1/material.min.js"></script>
<link rel="stylesheet" href="/rules_nodejs/main.css">
</head>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer
mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Check Bazel version</span>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">Bazel</span>
<nav class="drawer-nav">
<ul class="drawer-nav">
<li><a href="/rules_nodejs/index.html">Overview</a></li>
<li>
<a href="/rules_nodejs/common/check_bazel_version.html">Check Bazel version</a>
<ul>
<li><a href="/rules_nodejs/common/check_bazel_version.html#overview">Overview</a></li>
</ul>
</li>
<li>
<a href="/rules_nodejs/history-server/history_server.html">Run history-server</a>
<ul>
</ul>
</li>
<li>
<a href="/rules_nodejs/http-server/http_server.html">Run http-server</a>
<ul>
</ul>
</li>
<li>
<a href="/rules_nodejs/jasmine_node_test/jasmine_node_test.html">NodeJS testing</a>
<ul>
<li><a href="/rules_nodejs/jasmine_node_test/jasmine_node_test.html#overview">Overview</a></li>
</ul>
</li>
<li>
<a href="/rules_nodejs/node/node.html">Executing programs</a>
<ul>
<li><a href="/rules_nodejs/node/node.html#overview">Overview</a></li>
<li>
<a href="/rules_nodejs/node/node.html#nodejs_binary">
nodejs_binary
</a>
</li>
<li>
<a href="/rules_nodejs/node/node.html#nodejs_test">
nodejs_test
</a>
</li>
</ul>
</li>
<li>
<a href="/rules_nodejs/node/node_repositories.html">Install NodeJS & Yarn</a>
<ul>
<li><a href="/rules_nodejs/node/node_repositories.html#overview">Overview</a></li>
</ul>
</li>
<li>
<a href="/rules_nodejs/npm_install/npm_install.html">Install npm packages</a>
<ul>
<li><a href="/rules_nodejs/npm_install/npm_install.html#overview">Overview</a></li>
</ul>
</li>
<li>
<a href="/rules_nodejs/npm_package/npm_package.html">npm packaging</a>
<ul>
<li><a href="/rules_nodejs/npm_package/npm_package.html#overview">Overview</a></li>
<li>
<a href="/rules_nodejs/npm_package/npm_package.html#npm_package">
npm_package
</a>
</li>
</ul>
</li>
<li>
<a href="/rules_nodejs/rollup/rollup_bundle.html">Rollup bundling</a>
<ul>
<li><a href="/rules_nodejs/rollup/rollup_bundle.html#overview">Overview</a></li>
<li>
<a href="/rules_nodejs/rollup/rollup_bundle.html#rollup_bundle">
rollup_bundle
</a>
</li>
</ul>
</li>
</ul>
</nav>
</div>
<main class="mdl-layout__content">
<div class="page-content">
<h1>Check Bazel version</h1>
<nav class="toc">
<h2><a href="#overview">Overview</a></h2>
<h2>Macros</h2>
<ul>
<li><a href="#check_bazel_version">check_bazel_version</a></li>
<li><a href="#check_bazel_version_range">check_bazel_version_range</a></li>
</ul>
</nav>
<hr>
<h2 id="overview">Overview</h2>
<p>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.</p>
<hr>
<h2 id="check_bazel_version">check_bazel_version</h2>
<pre>check_bazel_version(<a href="#check_bazel_version.minimum_bazel_version">minimum_bazel_version</a>, <a href="#check_bazel_version.message">message</a>)</pre>
<p>Verify the users Bazel version is at least the given one.</p>
<p>This should be called from the <code>WORKSPACE</code> file so that the build fails as
early as possible. For example:</p>
<pre><code># in WORKSPACE:
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version")
check_bazel_version("0.26.0")
</code></pre>
<h3 id="check_bazel_version_args">Attributes</h3>
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="check_bazel_version.minimum_bazel_version">
<td><code>minimum_bazel_version</code></td>
<td>
<p><code>Unknown; Required</code></p>
<p>a string indicating the minimum version</p>
</td>
</tr>
<tr id="check_bazel_version.message">
<td><code>message</code></td>
<td>
<p><code>String; Optional</code></p>
<p>optional string to print to your users, could be used to help them update</p>
</td>
</tr>
</tbody>
</table>
<hr>
<h2 id="check_bazel_version_range">check_bazel_version_range</h2>
<pre>check_bazel_version_range(<a href="#check_bazel_version_range.minimum_bazel_version">minimum_bazel_version</a>, <a href="#check_bazel_version_range.maximum_bazel_version">maximum_bazel_version</a>, <a href="#check_bazel_version_range.message">message</a>)</pre>
<p>Verify the users Bazel version is in the version range.</p>
<p>This should be called from the <code>WORKSPACE</code> file so that the build fails as
early as possible. For example:</p>
<pre><code># in WORKSPACE:
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version_range")
check_bazel_version_range("0.11.0", "0.22.0")
</code></pre>
<h3 id="check_bazel_version_range_args">Attributes</h3>
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="check_bazel_version_range.minimum_bazel_version">
<td><code>minimum_bazel_version</code></td>
<td>
<p><code>Unknown; Required</code></p>
<p>a string indicating the minimum version</p>
</td>
</tr>
<tr id="check_bazel_version_range.maximum_bazel_version">
<td><code>maximum_bazel_version</code></td>
<td>
<p><code>Unknown; Required</code></p>
<p>a string indicating the maximum version</p>
</td>
</tr>
<tr id="check_bazel_version_range.message">
<td><code>message</code></td>
<td>
<p><code>String; Optional</code></p>
<p>optional string to print to your users, could be used to help them update</p>
</td>
</tr>
</tbody>
</table>
</div>
<footer class="mdl-mini-footer">
<div class="mdl-mini-footer__left-section">
<div class="mdl-logo">Bazel</div>
<ul class="mdl-mini-footer__link-list">
<li><a href="https://bazel.build">Home</a></li>
<li><a href="https://github.com/bazelbuild">GitHub</a></li>
</ul>
</div>
</footer>
</main>
</div>
</body>
</html>