blob: 3344300e89adeab2799cc0de4b4ed13d459cb7dd (
plain)
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
|
---
layout: documentation
title: Windows Chocolatey maintenance
---
Installing Bazel on Windows
===========================
You can install the unofficial package using the [chocolatey](https://chocolatey.org) package manager:
```shell
choco install bazel
```
This will install the latest available version of bazel, and dependencies.
This package is experimental; please provide feedback (`@petemounce` in issue tracker).
Maintaining Bazel Chocolatey package on Windows
===============================================
### Prerequisites
You need:
* [chocolatey package manager](https://chocolatey.org) installed
* (to publish) a chocolatey API key granting you permission to publish the `bazel` package
* [@petemounce](https://github.com/petemounce) currently maintains this unofficial package.
* (to publish) to have set up that API key for the chocolatey source locally via `choco apikey -k <your key here> -s https://chocolatey.org/`
### Build
Compile bazel with msys2 shell and `compile.sh`.
```powershell
pushd scripts/packages/chocolatey
./build.ps1 -version 0.3.1 -isRelease
popd
```
Should result in `scripts/packages/chocolatey/bazel.<version>.nupkg` being created.
#### Test
0. Build the package (without `isRelease`)
* run a webserver (`python -m SimpleHTTPServer` in `scripts/packages/chocolatey` is convenient and starts one on `http://localhost:8000`)
* adjust `chocolateyinstall.ps1` so that the `$url` and `$url64` parameters point to `http://localhost:8000/bazel_0.3.1_windows_x86_64.zip`
0. Test the install
The `test.ps1` should install the package cleanly (and error if it did not install cleanly), then tell you what to do next.
In a new (msys2) shell
```shell
bazel version
```
should result in that version, with executable from PATH.
0. Test the uninstall
```shell
choco uninstall bazel
# should remove bazel from the system - c:/tools/bazel should be deleted
```
Chocolatey's moderation process automates checks here.
### Publish
```shell
choco push bazel.x.y.z.nupkg --source https://chocolatey.org/
```
Chocolatey.org will then run automated checks and respond to the push via email to the maintainers.
|