Skip to content

Validate version on release#22

Merged
jasonrclark merged 4 commits intomainfrom
jasonrclark/validate-version
Apr 8, 2026
Merged

Validate version on release#22
jasonrclark merged 4 commits intomainfrom
jasonrclark/validate-version

Conversation

@jasonrclark
Copy link
Copy Markdown
Member

@jasonrclark jasonrclark commented Apr 7, 2026

Fixes https://github.com/github/spark/issues/2259

Our typical release process for this component is just to set a tagged release and let that go. This has the downside that our binary also thinks it knows its version over in cmd/version.go.

Rather than do something elaborate when we're not releasing this often, this PR simply adds a guardrail that will fail the release if the versions don't align. In that case, the move is to remove the partial release/tag, commit the updated version, and then release.

This should be sufficient for the moment, and if we get working on this more often to where it's an annoyance, we can put a more thorough system in place.

@jasonrclark jasonrclark requested a review from a team as a code owner April 7, 2026 23:15
Copilot AI review requested due to automatic review settings April 7, 2026 23:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a release-time guardrail to ensure the Git tag being built matches the CLI’s hardcoded Version, preventing accidental mismatched releases.

Changes:

  • Updates cmd/version.go’s Version string to 0.0.10.
  • Adds a version-validation step to the release GitHub Actions workflow.
  • Introduces a shell script to compare the pushed tag against cmd/version.go.
Show a summary per file
File Description
cmd/version.go Updates the CLI’s reported version string.
.github/workflows/release.yml Runs a version-check step during tag-based releases.
.github/workflows/check-version.sh Extracts the version from code and compares it with the release tag.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 3

nicodes
nicodes previously approved these changes Apr 7, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jasonrclark jasonrclark merged commit 554e547 into main Apr 8, 2026
5 checks passed
@jasonrclark jasonrclark deleted the jasonrclark/validate-version branch April 8, 2026 16:35
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.

3 participants