Skip to content

install: sort stable releases after their prereleases - #5548

Open
mohitmishra786 wants to merge 1 commit into
github:mainfrom
mohitmishra786:install-prerelease-version-sort
Open

mohitmishra786 wants to merge 1 commit into
github:mainfrom
mohitmishra786:install-prerelease-version-sort

Conversation

@mohitmishra786

Copy link
Copy Markdown

Fixes #5547.

VERSION=prerelease takes the last tag from git ls-remote --sort "version:refname". Git sorts v1.0.114 before v1.0.114-0, so after a stable release the script installed the last prerelease of that version, an older build, until the next -0 tag appeared. Setting versionsort.suffix=- makes -N tags sort before their release.

Tested in ubuntu:24.04 (git 2.43.0) with the reproduction from the issue (the real tag names as of 2026-11-18, served from a local repository through url.<base>.insteadOf):

  • before: Latest prerelease version: v1.0.114-0, installs 1.0.114-0
  • after: Latest prerelease version: v1.0.114, installs 1.0.114

Against the live tags the result is unchanged (v1.0.115-5).

git's version sort orders v1.0.114 before v1.0.114-0, so VERSION=prerelease
installed the last prerelease of a version after that version was released
as stable. Set versionsort.suffix so prerelease tags sort first.

Fixes github#5547
@mohitmishra786
mohitmishra786 requested review from a team and an adaptive review from Copilot November 21, 2026 15:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the installer’s prerelease tag-ordering change.

No open issues 🎉

What changed in this PR

Fixes #5547 by making the installer’s prerelease channel prefer a stable release over its own older prereleases, while still selecting newer prerelease versions.

Changes:

  • Adds versionsort.suffix=- to Git tag sorting.
  • Documents why stable releases should sort after their prereleases.
File Description
install.sh Corrects tag ordering for VERSION=prerelease and explains the sorting behavior.

Review effort: Balanced (adaptive)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants