bottom/docs/content/contribution/packaging-and-distribution.md
Clement Tsang 14808b3a2e
ci: completion/manpage generation script spring cleaning (#795)
* ci: spring cleaning of completions autogen

This commit changes a few things/cleans up stuff:
- Completion and manpage generation now drops the files off in
  `./target/tmp/bottom` rather than arbitrarily in the build directory.
  This was originally done because I was lazy and just needed it to work
  in CI, but it's kinda gross if you want to build the manpages in your
  own directory.
- CI was updated to handle this.
- Only run if the `BTM_GENERATE` env var is actually non-empty.

* docs: update for manpage/completion gen

* ci: auto delete autogen comp/manpage dir

* ci: fix incorrect mv for autogen

The mv was too late, should be earlier in the workflow.

* ci: specify shell in autogen delete

* docs: more updates to manpage/comp docs

* ci: unify env vars

* ci: skip autogen on build-msi
2022-08-30 18:25:16 -04:00

2.5 KiB

Packaging and Distribution

Package maintainers are always welcome and appreciated! Here's some info on how one can help with package distribution and bottom.

Pre-built binaries

The latest stable release can be found here, where you can find pre-built binaries in either a tar.gz or zip format. Binaries here also include automatically generated shell completion files for zsh, bash, fish, and Powershell, which you may want to also install during the packaging process.

You can also find a nightly build in the releases page, built every day at 00:00 UTC off of the master branch.

Building manually

If you want to manually build bottom rather than distributing a pre-built binary, you'll need the most recent version of stable Rust, which you can get with:

rustup update stable

You'll then want to build with:

cargo build --release --locked

Manpage and completion generation

bottom uses a build.rs script to automatically generate a manpage and shell completions for the following shells:

  • Bash
  • Zsh
  • Fish
  • Powershell
  • Elvish

If you want to generate manpages and/or completion files, set the BTM_GENERATION env var to a non-empty value. For example, run something like this:

BTM_GENERATE=true cargo build --release --locked

This will automatically generate completion and manpage files in target/tmp/bottom/. If you wish to regenerate the files, modify/delete either these files or set BTM_GENERATE to some other non-empty value to retrigger the build script.

For more information, you may want to look at either the build.rs file or the binary build CI workflow.

Adding an installation source

Once you've finished your installation source, if you want to mention it in the main bottom repo, fork the repo and add the installation method and any details to the README.md file under the Installation section. Once that's done, open a pull request - these will usually be approved of very quickly.

You can find more info on the contribution process here.