Conversation
Packit defaults to `git describe` for the project version. So when cutting a release, on PRs where we're bumping the chunkah version in `Cargo.toml`, we get a mismatch: `create-archives.sh` reads the version from `Cargo.toml` (e.g. 0.3.0), but `PACKIT_PROJECT_VERSION` resolved to 0.2.0 from the last tag, so `fix-spec-file` referenced a vendor tarball that didn't exist. Add a `get-current-version` action that reads the version from `Cargo.toml` via `cargo metadata`, keeping `PACKIT_PROJECT_VERSION` consistent with the archives that `create-archives.sh` produces. Assisted-by: OpenCode (Claude Opus 4.6)
There was a problem hiding this comment.
Code Review
This pull request introduces a get-current-version action in the Packit configuration to ensure the project version is consistently read from Cargo.toml during builds. This correctly fixes an issue with version mismatches in pull requests. My review includes a suggestion to address code duplication. The command to get the version is now present in two places, and I recommend refactoring it into a shared script to improve maintainability.
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.
Packit defaults to
git describefor the project version. So when cutting a release, on PRs where we're bumping the chunkah version inCargo.toml, we get a mismatch:create-archives.shreads the version fromCargo.toml(e.g. 0.3.0), butPACKIT_PROJECT_VERSIONresolved to 0.2.0 from the last tag, sofix-spec-filereferenced a vendor tarball that didn't exist.Add a
get-current-versionaction that reads the version fromCargo.tomlviacargo metadata, keepingPACKIT_PROJECT_VERSIONconsistent with the archives thatcreate-archives.shproduces.Assisted-by: OpenCode (Claude Opus 4.6)