Debian Codegraph @

docs/content/contribution/packaging-and-distribution.md

raw symbols SCIP
1 # Packaging and Distribution
2
3 Package maintainers are always welcome and appreciated! Here's some info on how one can help with package distribution
4 and bottom.
5
6 ## Pre-built binaries
7
8 The latest stable release can be found [here](https://github.com/ClementTsang/bottom/releases/latest), where you can
9 find pre-built binaries in either a `tar.gz` or `zip` format. Binaries here also include automatically generated shell
10 completion files for zsh, bash, fish, and Powershell, which you may want to also install during the packaging
11 process.
12
13 You can also find a nightly build in the [releases page](https://github.com/ClementTsang/bottom/releases), built every
14 day at 00:00 UTC off of the `main` branch.
15
16 In both cases, we use GitHub Actions to create our release binaries.
17 [`build_releases.yml`](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/build_releases.yml)
18 contains the GitHub Action workflow for this.
19
20 ## Building manually
21
22 If you want to manually build bottom rather than distributing a pre-built binary, you'll need the most recent version
23 of stable Rust, which you can get with:
24
25 ```bash
26 rustup update stable
27 ```
28
29 You'll then want to build with:
30
31 ```bash
32 cargo build --release --locked
33 ```
34
35 ### Manpage and completion generation
36
37 bottom uses a [`build.rs`](https://github.com/ClementTsang/bottom/blob/main/build.rs) script to automatically generate
38 a manpage and shell completions for the following shells:
39
40 - Bash
41 - Zsh
42 - Fish
43 - Powershell
44 - Elvish
45
46 If you want to generate manpages and/or completion files, set the `BTM_GENERATE` env var to a non-empty value. For
47 example, run something like this:
48
49 ```bash
50 BTM_GENERATE=true cargo build --release --locked
51 ```
52
53 This will automatically generate completion and manpage files in `target/tmp/bottom/`. If you wish to regenerate the
54 files, modify/delete either these files or set `BTM_GENERATE` to some other non-empty value to retrigger the build
55 script.
56
57 You may override the default directories used to generate both completion and manpage files by specifying the
58 `COMPLETION_DIR` and `MANPAGE_DIR` environment variables respectively.
59
60 For more information, you may want to look at either the [`build.rs`](https://github.com/ClementTsang/bottom/blob/main/build.rs)
61 file or the [binary build CI workflow](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/build_releases.yml).
62
63 ## Adding an installation source
64
65 Once you've finished your installation source, if you want to mention it in the main bottom repo, fork the repo and add
66 the installation method and any details to the [`README.md`](https://github.com/ClementTsang/bottom/blob/main/README.md)
67 file under the [Installation](https://github.com/ClementTsang/bottom#installation) section, as well as a corresponding
68 table of contents entry. Once that's done, open a pull request - these will usually be approved of very quickly.
69
70 You can find more info on the contribution process [here](issues-and-pull-requests.md#pull-requests).