Skip to content
João Marcos Bezerra edited this page Nov 17, 2022 · 6 revisions

Thanks for your interest in helping Ouch!

This page can be edited by anyone, feel free to add more details to it.

If necessary, you can start a discussion at https://github.com/ouch-org/ouch/discussions.

Packaging status

Breaking changes for packaging

Since 0.4.0 (November 2022)

  • Ouch can now generate its own man pages (used to rely on help2man).
  • ENV VAR for building artifacts has changed (see below).

How to build artifacts

Run cargo build with the OUCH_ARTIFACTS_FOLDER env var set.

OUCH_ARTIFACTS_FOLDER=artifacts cargo build

This tells the script at build.rs to:

  • Generate shell completions.
  • Generate man pages.

At the provided folder, in this case, we passed the folder name artifacts.

tree artifacts
├── ouch.1             # man page
├── ouch-compress.1    # man page - subcommand 'compress'
├── ouch-decompress.1  # man page - subcommand 'decompress'
├── ouch-list.1        # man page - subcommand 'list'
├── _ouch              # shell completions for Zsh
├── ouch.bash          # shell completions for Bash
├── ouch.elv           # shell completions for Elvish
├── ouch.fish          # shell completions for Fish
└── _ouch.ps1          # shell completions for PowerShell

Save time on compiling

If your package builds artifacts (manpage and completions) and then compiles Ouch with optimizations, it might compile the project twice.

# To generate manpage and completion artifacts
OUCH_ARTIFACTS_FOLDER=artifacts cargo build # Builds without optimizations

# To build the end binary
cargo build --release # Builds with optimization

Instead of this, run the first command with --release, this way, Ouch will run both builds in the same profile, as fast as the latter.

OUCH_ARTIFACTS_FOLDER=artifacts cargo build --release

Clone this wiki locally