From 9c8bdaa03aac46a59a843602926fb05fc7f49c3f Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 13 May 2026 12:17:40 -0700 Subject: [PATCH] Fix pre-release badges to actually track pre-releases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both `shields.io/github/v/release/...?include_prereleases` and `shields.io/nuget/vpre/...` use "include pre-releases as candidates, return latest by date/version" semantics — not "show pre-releases only". After every develop → main release merge a full release is published with a higher Nerdbank.GitVersioning height than the preceding pre-releases, so both pre-release badges converged to the same value as their release-only siblings within seconds. Observed today after #144 landed: the GitHub Pre-Release badge showed `v1.2.42` (a full release) while the actual latest pre-release was `1.2.40-g0f69a1b0a0`. Two changes: - Add `&filter=*-g*` to the GitHub pre-release shield URL. The `filter` glob is supported on `github/v/release` and matches the Nerdbank `-g` suffix that only pre-release tags carry; stable tags (`1.2.42`) don't. Verified live: the filtered URL renders `v1.2.40-g0f69a1b0a0` correctly. - Drop the NuGet pre-release badge entirely. The NuGet shield endpoint accepts only the path-level `v`/`vpre` variant and ignores `filter`; the `dynamic/json` escape hatch doesn't support JSONPath filter predicates (`query not supported`), and NuGet's flat-container index is semver-sorted so `[-1]` lands on the same stable. No clean shields.io fix exists, and the data is structurally redundant with the NuGet Release badge whenever a higher stable exists. The GitHub Pre-Release badge now carries the pre-release signal on its own. The upstream template carries the same badge pattern and is tracked separately for replication. --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 40be2a3..caa568b 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,7 @@ C# .NET library for ISO 639-2, ISO 639-3, RFC 5646 / BCP 47 language tags. [![GitHub Release][releaseversion-shield]][releases-link]\ [![GitHub Pre-Release][prereleaseversion-shield]][releases-link]\ -[![NuGet Release][nugetreleaseversion-shield]][nuget-link]\ -[![NuGet Pre-Release][nugetprereleaseversion-shield]][nuget-link] +[![NuGet Release][nugetreleaseversion-shield]][nuget-link] ### Release Notes @@ -585,12 +584,11 @@ Licensed under the [MIT License][license-link]\ [lastcommit-shield]: https://img.shields.io/github/last-commit/ptr727/LanguageTags?logo=github&label=Last%20Commit [releaseversion-shield]: https://img.shields.io/github/v/release/ptr727/LanguageTags?logo=github&label=GitHub%20Release -[prereleaseversion-shield]: https://img.shields.io/github/v/release/ptr727/LanguageTags?include_prereleases&label=GitHub%20Pre-Release&logo=github +[prereleaseversion-shield]: https://img.shields.io/github/v/release/ptr727/LanguageTags?include_prereleases&filter=*-g*&label=GitHub%20Pre-Release&logo=github [releasebuildstatus-shield]: https://img.shields.io/github/actions/workflow/status/ptr727/LanguageTags/publish-release.yml?logo=github&label=Releases%20Build [nuget-link]: https://www.nuget.org/packages/ptr727.LanguageTags/ [nugetreleaseversion-shield]: https://img.shields.io/nuget/v/ptr727.LanguageTags?logo=nuget&label=NuGet%20Release -[nugetprereleaseversion-shield]: https://img.shields.io/nuget/vpre/ptr727.LanguageTags?logo=nuget&&label=NuGet%20Pre-Release&color=orange