Repository navigation
fix: do not tell CI builds they are too old - #17
Merged
Merged
Conversation
`hawser version --json` reports `0.0.0-ci` on pull-request builds and `0.0.0-dryrun` on a release dry run -- hawser's release workflow stamps those deliberately to mean "not a release". The version check exempted only the literal string `dev`, so both parsed as 0.0.0, compared below every minimum, and anyone testing a CI artifact was warned their hawser was too old when the version only ever meant it was not a release. Replace the `!== 'dev'` test with isRelease(), which also treats a 0.0.0 prefix as not-a-release. Genuinely old releases still warn: 0.2.0 and 0.2.0-9-gabc-dev are unaffected, and a local source build (0.3.0-50-g...-dev) was already quiet because the comparison splits on "-" as well as "." and so reads the extra segments as greater. Found while checking this extension against a freshly built hawser: the CLI contract itself is unchanged (status/version --json fields all still in their declared unions), so this was the only drift.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Found while checking this extension against a freshly built hawser CLI.
The bug
hawser version --jsonreports0.0.0-cion pull-request builds and0.0.0-dryrunon a release dry run — hawser'srelease.ymlstamps those deliberately to mean "not a release".The check exempted only the literal string
dev:Both CI markers parse as
0.0.0, which is below every minimum. So anyone testing a CI artifact got "Hawser 0.0.0-ci found; this extension expects 0.3.0 or newer" — when the version only ever meant it was not a release.The fix
isRelease()also treats a0.0.0prefix as not-a-release. Verified against every version string hawser actually emits:0.0.0-ci0.0.0-dryrundev0.3.0-50-g650c25e-dev0.3.00.2.00.2.0-9-gabc-devGenuinely old releases still warn. A local source build was already quiet, incidentally —
comparesplits on-as well as., so the extra-50-g…segments read as greater than0.3.0.The rest of the contract is in sync
I checked the whole CLI coupling against a hawser built from today's
main:installed,supervisor,engine,desired,distro?,profile?andversion.appare all present and inside their declared unions. Recent hawser changes — a rewritteninstallrefusal message, a newrelocatecommand with its own exit code 12 — touch nothing here, because this extension parses--jsononly and never scrapes human-readable text.npm run checkandnpm run build -- --productionboth pass locally.