Skip to content

Commit

Permalink
Add section on package version management in README
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Jan 10, 2024
1 parent d09656a commit 50f3ee2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,19 @@ patch -p1 -d $KAPITAN_VENV < hack/kapitan_0.32_reclass_rs.patch

Please note that we've only tested the patch against the Kapitan 0.32 release as published on PyPI.

## Automated package version management

We generate the package version of `reclass-rs` from the latest Git tag when building Python wheels.
To ensure this always works, we keep the base version in `Cargo.toml` as `0.0.0`.

For tag builds, the generated version matches the tag.
For PR and branch builds, the generated version is `git describe --tags --always --match=v*` without the component derived from the commit hash.

The version is injected with [cargo-edit]'s `cargo set-version` before the Python wheels are built.

See the ["Python" workflow](./.github/workflows/python.yml) for more details.

[rustup]: https://rustup.rs/
[maturin]: https://github.com/PyO3/maturin
[Kapitan]: https://kapitan.dev
[cargo-edit]: https://github.com/killercup/cargo-edit

0 comments on commit 50f3ee2

Please sign in to comment.