-
Notifications
You must be signed in to change notification settings - Fork 102
fix: version validation scripts for release tagging #1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: version validation scripts for release tagging #1364
Conversation
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the version validation logic in the release workflow by extracting it from an inline script into a dedicated, testable bash script with comprehensive test coverage. The changes improve maintainability and add proper handling for SemVer pre-release semantics.
- Extracted version validation logic into a standalone, reusable script (
validate_version.sh) - Added special handling for SemVer pre-release vs. final release edge cases that
sort -Vdoesn't handle correctly - Created comprehensive test suite (
test_validation.sh) with 15 test cases covering various version comparison scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/scripts/release/validate_version.sh |
New standalone script implementing version validation logic with SemVer pre-release support |
.github/workflows/scripts/release/test_validation.sh |
New test harness with 15 test cases validating version comparison edge cases |
.github/workflows/release.yml |
Refactored to extract tag variables and invoke the new validation script via environment variables |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1364 +/- ##
=======================================
Coverage 39.31% 39.31%
=======================================
Files 42 42
Lines 5927 5927
=======================================
Hits 2330 2330
Misses 3396 3396
Partials 201 201 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
5d2dcb4
into
project-copacetic:main
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
Adds more robust checks and tests for releasing an upgrade
Closes #1363
Tested on my own fork: