Fix README update skipped on new editions#424
Merged
Conversation
Capture the old latest version before modifying bakery.yaml and compare it to the new latest after. This replaces the fragile git-diff grep approach which failed because the version name: line was a context line in the diff, not a removed line. The README update now triggers when the latest version changes (new edition or patch to current latest) and is correctly skipped when patching an older edition.
b46b6bd to
928b1cf
Compare
bschwedler
added a commit
to posit-dev/images-connect
that referenced
this pull request
Apr 6, 2026
Temporary change to test the README update fix in posit-dev/images-shared#424. Revert before merging.
When the release workflow is re-run for the same version, the release branch already exists on the remote from the previous run. --force-with-lease rejects the push because the fresh checkout has no local knowledge of the remote ref. Fetching first gives git the remote state it needs to evaluate the lease.
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.
Summary
product-release.ymlwhere the "Update READMEs" step was always skipped when creating a new editionname:line to be a removed line (^-) in the diff, but bakery only removes thelatest: truekey — thename:line is unchanged contextRoot cause
When
bakery create versionmoveslatest: truefrom the old version to the new one, the diff looks like:- name: 2026.02.0 subpath: '2026.02' - latest: trueThe
name:line is a context line (starts with space), not a removed line (starts with-). The old grep^\-.*name:never matched.Test plan