multi(release): Several small updates to toys-release#469
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the toys-release generators to avoid prompting when generated output is unchanged, and relaxes version parsing/updating so major-only versions (e.g. "1") are considered valid.
Changes:
- Skip overwrite/create confirmations when the destination file already exists and has identical content to the generated output.
- Replace existing destinations (including non-regular files) after confirmation by removing the existing entry before writing.
- Update
VersionRbFile’s version-matching regex to allow versions with only a major segment.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
toys-release/toys/gen-workflows.rb |
Adds content-based “unchanged” detection and removes/recreates destinations on overwrite. |
toys-release/toys/gen-gh-pages.rb |
Inlines destination checks into generate_file, adds “unchanged” short-circuit, and removes existing entries before writing. |
toys-release/toys/.lib/toys/release/version_rb_file.rb |
Broadens VERSION regex to allow major-only versions when reading/updating. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3083fb8 to
3943016
Compare
fix(release): gen-gh-pages and gen-workflows no longer ask for confirmation if a file to generate is unchanged fix(release): Release versions can now omit version fields beyond major, e.g. version "1" is now legal
3943016 to
30719f2
Compare
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.
fix(release): gen-gh-pages and gen-workflows no longer ask for confirmation if a file to generate is unchanged
fix(release): Release versions can now omit version fields beyond major, e.g. version "1" is now legal