release: a file holding two version fields gets both - #57
Merged
Conversation
Dispatching Release with 1.1.0 failed at the bump, which is where it was supposed to fail if it was going to fail at all: the marketplace catalogue holds two of the seven fields, metadata.version and plugins.0.version, and the script had been reading every file before writing any of them. Each write then started from the text read before the other write, so the second one dropped the first and metadata.version stayed at 1.0.0. Reading first is still right — it is what keeps a missing file from leaving a half-versioned tree — so the reads are now keyed by path rather than by field, and every field of a file is applied to one text that is written once. No new test. `--check` immediately after the set is what caught this, it runs in the release workflow and in the local gates, and it fails on exactly the state this bug produces.
Deploying super-prototyping with
|
| Latest commit: |
06f1e54
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://48dcc529.super-prototyping.pages.dev |
| Branch Preview URL: | https://fix-bump-two-fields.super-prototyping.pages.dev |
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.
What this changes
scripts/bump-version.sh. Dispatching Release with1.1.0failed at the bump step (run), which is the one place it was cheap to find out:Six of the seven version fields are one per file; the marketplace catalogue holds two. Since #54 the script reads every file before writing any of them, so both catalogue writes started from the same pre-write text and the second one dropped the first.
Reading first is still right — it is what stops a file listed in
.version-bump.jsonbut missing from leaving a half-versioned tree. The reads are now keyed by path instead of by field, and every field of a file is applied to one text that gets written once.Verified
scripts/bump-version.sh 1.1.0then--check: all seven agree, both catalogue fields moved, the file's formatting is unchanged, and a second run reports all seven already there and writes nothing. Manifests reverted to 1.0.0 in this branch — moving them is the release workflow's job.No new test:
--checkright after the set is what caught this, it already runs in the release workflow and in the local gates, and it fails on exactly the state this bug produces.Checklist
ref-*.html,assets/refs/or other third-party captures are in this PR.## Unreleasedline.canvas/change.