Skip to content

Add --version and version releases from Cargo.toml - #2

Merged
gilesw merged 5 commits into
mainfrom
fix-deb-smoke-test
Oct 28, 2026
Merged

gilesw merged 5 commits into
mainfrom
fix-deb-smoke-test

Conversation

@gilesw

@gilesw gilesw commented Oct 28, 2026 •

Copy link
Copy Markdown

below had no --version flag, so test_deb.sh failed after a successful install.

  • below --version prints the crate version, e.g. below 0.12.0. As in ripgrep, builds that are not the v<version> release tag append the commit: below 0.12.0 (rev <hash>).
  • All workspace crates are bumped to 0.12.0.
  • release.yml runs on vX.Y.Z tags and fails unless the tag matches the version in below/Cargo.toml.
  • package_deb.sh lets cargo deb take the version from the manifest, giving below_0.12.0-1_<arch>.deb.
  • test_deb.sh checks that below --version matches the installed package's version.

To release: mise run version <version> (runs cargo set-version --workspace), merge, then push v<version>. mise.toml also pins actionlint, shellcheck, cargo-edit and cargo-deb and has deb, test:deb and lint tasks.

The version is BELOW_VERSION when set at build time, otherwise the crate
version. build.yml sets it from scripts/version.sh, which package_deb.sh
now also uses, so below --version matches the deb version. test_deb.sh
checks that they match.
@gilesw gilesw changed the title Smoke test the installed deb with below --help Add --version and check it in the deb smoke test Oct 28, 2026
below --version prints the crate version. release.yml runs on vX.Y.Z
tags and fails unless the tag matches below/Cargo.toml, and cargo deb
takes the package version from the manifest, so the binary, the deb and
the release all carry the same version. This replaces the git describe
version from scripts/version.sh.
@gilesw gilesw changed the title Add --version and check it in the deb smoke test Add --version and version releases from Cargo.toml Oct 28, 2026
Like ripgrep, build.rs passes the short commit hash to the build and
--version prints "below 0.12.0 (rev <hash>)". When HEAD is the
v<version> tag the hash is left out, so release builds print
"below 0.12.0".
mise run version <version> runs cargo set-version --workspace, which
bumps every crate and the internal dependency versions autocargo writes
next to each path. cargo-deb is pinned to the same version in CI.
@gilesw
gilesw merged commit c12cc73 into main Oct 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant