Skip to content

fix: release artifact versioning - #195

Merged
illeatmyhat merged 1 commit into
mainfrom
release-fix
Apr 17, 2026
Merged

fix: release artifact versioning#195
illeatmyhat merged 1 commit into
mainfrom
release-fix

Conversation

@illeatmyhat

@illeatmyhat illeatmyhat commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

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

  • Chores
    • Improved release automation to ensure installation scripts in GitHub releases include correct version information.
    • Updated installer script version defaults for better out-of-the-box behavior.

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".
@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Release workflow
.github/workflows/release-github.yaml
Added conditional step that generates a tag-specific install.sh by rewriting SCRIPT_VERSION from "main" to the released version, then uploads it to the GitHub release using gh release upload --clobber.
Install script defaults
platform-integrations/install.sh
Changed default SCRIPT_VERSION from pinned tag v1.0.8 to "main", and updated comments to clarify that SCRIPT_VERSION is substituted during release to ensure correct artifact downloads.
Build configuration
pyproject.toml
Modified semantic_release build_command to revert install.sh changes after build (git checkout) instead of staging them for commit, ensuring the repository version remains at "main".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • AgentToolkit/altk-evolve#173: Also modifies platform-integrations/install.sh to change SCRIPT_VERSION default to "main", directly overlapping with this PR's script changes.

Suggested reviewers

  • visahak

Poem

🐰 Scripts versioned "main" in the warren so bright,
When releases hop by, we rewrite with delight,
Tag-specific bundles in GitHub ascend,
While repos stay clean—version control's a friend! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: release artifact versioning' accurately describes the main objective of the changeset, which addresses the issue of incorrect version stamping in release artifacts by reverting the install.sh file after building.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release-fix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
pyproject.toml (1)

118-121: Remove redundant sed and git checkout from the build script — version substitution is handled separately in the release workflow.

platform-integrations/install.sh is excluded from packaging (line 159), so the sed modification on line 118 never enters the wheel/sdist. The file is reverted immediately after uv build on 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 the install.sh asset 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

📥 Commits

Reviewing files that changed from the base of the PR and between b177220 and 61b12a2.

📒 Files selected for processing (3)
  • .github/workflows/release-github.yaml
  • platform-integrations/install.sh
  • pyproject.toml

@illeatmyhat
illeatmyhat merged commit 0b055da into main Apr 17, 2026
6 checks passed
@illeatmyhat
illeatmyhat deleted the release-fix branch April 17, 2026 17:33
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