fix: release artifact versioning - #195
Conversation
Adds platform-integrations/install.sh to GitHub release assets, with SCRIPT_VERSION stamped to the release tag at upload time via sed. Previously, PSR committed the version-stamped install.sh back to main, leaving the branch permanently at the last release version rather than "main". The build_command now restores the file with git checkout after uv build, so built artifacts (wheel, sdist) get the correct version while main always stays at SCRIPT_VERSION="main".
📝 WalkthroughWalkthroughThe changes implement a release automation workflow for the install.sh script. The installation script now defaults to SCRIPT_VERSION="main", while the release workflow generates and uploads a tag-specific version as a release asset. The build process ensures the repository file remains unchanged by reverting install.sh during version bumping. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pyproject.toml (1)
118-121: Remove redundantsedandgit checkoutfrom the build script — version substitution is handled separately in the release workflow.
platform-integrations/install.shis excluded from packaging (line 159), so thesedmodification on line 118 never enters the wheel/sdist. The file is reverted immediately afteruv buildon line 120, making the modify-then-revert sequence a no-op. Release-specific version substitution is already handled in.github/workflows/release-github.yaml(lines 125–126) when uploading theinstall.shasset to GitHub releases.♻️ Proposed simplification
- sed -i 's/^SCRIPT_VERSION="main"/SCRIPT_VERSION="v'"$NEW_VERSION"'"/' platform-integrations/install.sh uv build - git checkout platform-integrations/install.sh mv README.md.bak README.md🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pyproject.toml` around lines 118 - 121, Remove the redundant version substitution and revert steps in the build sequence: delete the sed invocation that edits platform-integrations/install.sh (the line containing sed -i 's/^SCRIPT_VERSION="main"/SCRIPT_VERSION="v'"$NEW_VERSION"'"/' platform-integrations/install.sh) and the git checkout platform-integrations/install.sh line that immediately reverts it; keep the uv build and README.md restore lines intact. This preserves the build flow while eliminating the no-op edit/revert of platform-integrations/install.sh which is handled by the release workflow.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@pyproject.toml`:
- Around line 118-121: Remove the redundant version substitution and revert
steps in the build sequence: delete the sed invocation that edits
platform-integrations/install.sh (the line containing sed -i
's/^SCRIPT_VERSION="main"/SCRIPT_VERSION="v'"$NEW_VERSION"'"/'
platform-integrations/install.sh) and the git checkout
platform-integrations/install.sh line that immediately reverts it; keep the uv
build and README.md restore lines intact. This preserves the build flow while
eliminating the no-op edit/revert of platform-integrations/install.sh which is
handled by the release workflow.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8e9a70bd-eb95-4161-a6b1-b3e7568a89f9
📒 Files selected for processing (3)
.github/workflows/release-github.yamlplatform-integrations/install.shpyproject.toml
Previously, PSR committed the version-stamped install.sh back to main, leaving the branch permanently at the last release version rather than "main". The build_command now restores the file with git checkout after uv build, so built artifacts (wheel, sdist) get the correct version while main always stays at SCRIPT_VERSION="main".
Adds platform-integrations/install.sh to GitHub release assets, with SCRIPT_VERSION stamped to the release tag at upload time via sed.
Summary by CodeRabbit