script: Update version check in Rolling release binary upload script to exclude '-dev' versions #903
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.
Identify the Bug
The Rolling Release upload script trusts CI to either give it a clean Regular version, e.g.
v1.113.0
, or a long, timestamped, Rolling version, e.g.v1.113.2024013003
.If someone (me) messes up the CI to where the version in
package.json
of the repo is somehow still e.g.v1.113.0-dev
when the script is run (as I accidentally did in #858), the upload script will attempt to upload a binary based on this not-Rolling-style version string, setting up a tag on the rolling release binaries repo that shouldn't be there, and which potentially keeps getting overwritten multiple times due to the aforementioned (hypothetical, but also presently real) CI screw up persisting onmaster
branch and running again after each PR lands, which I may have hypothetically, but definitely did practically, cause with #858.Description of the Change
Teach the Rolling release binary upload script to recognize rogue "
-dev
" version strings that should not be uploaded, and not upload if those version strings are encountered (much like we already correctly do for well-formed Regular release version strings).Alternate Designs
Maybe I should actually have the script exit with exit code 1 to have CI error, since this isn't a situation we should be in, attempting to upload bins without a proper version number, which screws with our Rolling release repo.
Yeah, maybe I'll go do that instead. Gonna open this as draft, because I need sleep.
Possible Drawbacks
Verification Process
Worked in local testing with a
v1.113.0-dev
version string.Script now properly rejects this, instead of over-trustingly assuming it must be a proper Rolling version since "it's not short enough to be a Regular release version."
Any further verification is TBD.Looks like it's working. See: #903 (comment)Release Notes
Tweak Rolling release binary upload script to reject
-dev
version strings, as it should.