Skip to content

Fix README update skipped on new editions#424

Merged
bschwedler merged 2 commits into
mainfrom
worktree-fix-readme-update
Apr 6, 2026
Merged

Fix README update skipped on new editions#424
bschwedler merged 2 commits into
mainfrom
worktree-fix-readme-update

Conversation

@bschwedler
Copy link
Copy Markdown
Contributor

@bschwedler bschwedler commented Apr 6, 2026

Summary

  • Fix a bug in product-release.yml where the "Update READMEs" step was always skipped when creating a new edition
  • The grep pattern required the version name: line to be a removed line (^-) in the diff, but bakery only removes the latest: true key — the name: line is unchanged context

Root cause

When bakery create version moves latest: true from the old version to the new one, the diff looks like:

       - name: 2026.02.0
         subpath: '2026.02'
-        latest: true

The name: line is a context line (starts with space), not a removed line (starts with -). The old grep ^\-.*name: never matched.

Test plan

  • Trigger release workflow with a version that changes the latest edition
  • Verify READMEs are updated with the new version references

@bschwedler bschwedler requested a review from ianpittwood as a code owner April 6, 2026 13:25
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.
@bschwedler bschwedler force-pushed the worktree-fix-readme-update branch from b46b6bd to 928b1cf Compare April 6, 2026 13:32
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.
@bschwedler bschwedler merged commit 96c7c0a into main Apr 6, 2026
13 checks passed
@bschwedler bschwedler deleted the worktree-fix-readme-update branch April 6, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant