Repository navigation
Add --version and version releases from Cargo.toml - #2
Merged
Merged
Conversation
below has no --version flag.
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
below had no
--versionflag, sotest_deb.shfailed after a successful install.below --versionprints the crate version, e.g.below 0.12.0. As in ripgrep, builds that are not thev<version>release tag append the commit:below 0.12.0 (rev <hash>).release.ymlruns onvX.Y.Ztags and fails unless the tag matches the version inbelow/Cargo.toml.package_deb.shlets cargo deb take the version from the manifest, givingbelow_0.12.0-1_<arch>.deb.test_deb.shchecks thatbelow --versionmatches the installed package's version.To release:
mise run version <version>(runscargo set-version --workspace), merge, then pushv<version>.mise.tomlalso pins actionlint, shellcheck, cargo-edit and cargo-deb and hasdeb,test:deband lint tasks.