Fix: Prevent Docker 'latest' tag regression on older maintenance releases (#2598)
Problem:
The Docker tagging logic was blindly following GitHub's "latest"
redirect. When an older maintenance patch (e.g., 8.7.0) was released
after a newer major version (e.g., 9.1.0), the Docker latest tag would
incorrectly regress to the older version.
Solution:
Introduced a semantic version check using sort -V. The script now
compares the current build version against the GitHub "latest" version
and only updates the Docker latest tag if the current build is
semantically greater than or equal to the version on GitHub.
Impact:
- bazel:latest is guaranteed to point to the highest version number.
- Maintenance releases for older branches will no longer "hijack" the
latest tag.
- Eliminates manual tag corrections after legacy branch updates.
PR https://github.com/bazelbuild/continuous-integration/pull/2598
(Continuous-integration): Fixes the Docker Registry (bazel:latest tag).
PR https://github.com/bazelbuild/bazel/pull/29452 (Bazel): Fixes the
GitHub Releases Page (the green "Latest" badge).
1 file changed