docs: fix README canary release badge resolving to stable version (#9109)

The canary badge's filter (!*-*-*) only excludes tags with two or more
dashes (nightly and dev builds), so zero-dash stable tags also pass.
Because shields.io picks the newest release by date and v1.2.0 GA was
created after v1.3.0-alpha.1, the canary badge displayed v1.2.0, which
is already covered by the stable badge.

Add sort=semver so shields picks the semver-greatest matching tag
instead: v1.3.0-alpha.1 now ranks above v1.2.0. Also apply sort=semver
to the stable badge to protect it from the same date-order failure when
a patch of an older minor is released after a newer GA.

Signed-off-by: Ning Sun <sunning@greptime.com>
This commit is contained in:
Ning Sun
2026-09-10 14:20:53 +00:00
committed by GitHub
parent ab0b1f5cce
commit 9dabe8ccd2
+2 -2
View File
@@ -20,10 +20,10 @@ One engine, on your infrastructure.</h2>
</h3>
<a href="https://github.com/GreptimeTeam/greptimedb/releases/latest">
<img src="https://img.shields.io/github/v/release/GreptimeTeam/greptimedb?filter=!*-*&label=stable&color=brightgreen" alt="Stable"/>
<img src="https://img.shields.io/github/v/release/GreptimeTeam/greptimedb?filter=!*-*&sort=semver&label=stable&color=brightgreen" alt="Stable"/>
</a>
<a href="https://github.com/GreptimeTeam/greptimedb/releases">
<img src="https://img.shields.io/github/v/release/GreptimeTeam/greptimedb?include_prereleases&filter=!*-*-*&label=canary&color=blueviolet" alt="Canary"/>
<img src="https://img.shields.io/github/v/release/GreptimeTeam/greptimedb?include_prereleases&filter=!*-*-*&sort=semver&label=canary&color=blueviolet" alt="Canary"/>
</a>
<a href="https://github.com/GreptimeTeam/greptimedb/releases">
<img src="https://img.shields.io/github/v/release/GreptimeTeam/greptimedb?include_prereleases&filter=*-nightly-*&label=nightly&color=orange" alt="Nightly"/>