server: selfupdate must normalize namespaced tags; build-status: pipeline green
server-test / test (push) Successful in 24s

Release tags are server-v1.2.3 but binaries are stamped v1.2.3 — the raw
comparison would re-download the current version on every check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
mrambossek
2026-07-30 16:38:08 +02:00
co-authored by Claude Opus 5
parent ebcb012450
commit b7658a6777
2 changed files with 12 additions and 4 deletions
+5 -1
View File
@@ -49,7 +49,11 @@ func Run(api, currentVersion string) error {
if err := json.NewDecoder(resp.Body).Decode(&rel); err != nil {
return err
}
if rel.TagName == "" || rel.TagName == currentVersion {
// Tags are namespaced (server-v1.2.3) but binaries are stamped with the
// bare version (v1.2.3) — compare the normalized forms or the updater
// would re-download the same version forever.
latest := strings.TrimPrefix(rel.TagName, "server-")
if rel.TagName == "" || latest == currentVersion {
fmt.Printf("already current (%s)\n", currentVersion)
return nil
}