mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
On a `release: released` event the freshly-created git tag is often not yet visible to `git fetch --tags` when docker-publish runs, so the :latest-promotion gate built its candidate set purely from `git tag -l` and resolved the highest semver to the previous version — leaving :latest one release behind. Extract the decision into scripts/ci/should-promote-latest.sh, which folds the current VERSION into the candidate set before picking the highest stable semver, making promotion independent of tag-sync timing. A patch published after a higher minor still won't grab :latest. Regression guard: tests/unit/build/should-promote-latest-5301.test.ts (spawns the real helper with fixture tag lists; proves the race case now promotes).