Skip to content

FE-2552: Fix previous release branch lookup to use natural version sort - #20

Merged
gotbahn merged 2 commits into
mainfrom
fix/version-sort-previous-branch
May 15, 2026
Merged

gotbahn merged 2 commits into
mainfrom
fix/version-sort-previous-branch

Conversation

@gotbahn

@gotbahn gotbahn commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

The scheduled cut workflow in zattoo/frontend created release/embed/2.13 from a stale commit because Cactus picked the wrong "previous" release branch. The lookup in src/git.js used git branch -r --list ... | tail -1, which sorts lexicographically — so release/embed/2.9 ranked above release/embed/2.12. The base commit then resolved to merge-base(master, 2.9), miles behind master.

Switching to --sort=-version:refname | head -1 uses git's built-in natural version sort (available since git 2.7), and 2.12 correctly outranks 2.9. dist/index.js was rebuilt with npm run pack, and CHANGELOG.md + package.json were bumped to 5.0.1.

The v5 branch needs to be advanced to this commit after merge so the zattoo/cactus@v5 pin in consumer workflows picks the fix up.

Tracked in FE-2557.

`git branch -r --list | tail -1` sorted lexicographically, so
`release/embed/2.9` ranked above `release/embed/2.12` and the new
release branch was cut from a stale base commit. Switch to
`--sort=-version:refname | head -1` so `2.12` wins over `2.9`.
@gotbahn gotbahn self-assigned this May 14, 2026
@gotbahn
gotbahn marked this pull request as ready for review May 14, 2026 21:25
@gotbahn
gotbahn requested a review from pverkhovskyi as a code owner May 14, 2026 21:25
@gotbahn gotbahn changed the title Fix previous release branch lookup to use natural version sort FE-2552: Fix previous release branch lookup to use natural version sort May 14, 2026
@gotbahn
gotbahn requested a review from a team as a code owner May 14, 2026 21:29
@gotbahn
gotbahn removed the request for review from pverkhovskyi May 14, 2026 21:29
Comment thread dist/index.js
@gotbahn
gotbahn merged commit 92b37a4 into main May 15, 2026
1 check passed
@gotbahn
gotbahn deleted the fix/version-sort-previous-branch branch May 15, 2026 07:41
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.

3 participants