From f192d5597144d112a909b05ffdbcbc2943630f47 Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Thu, 30 Jan 2025 15:17:36 +0100 Subject: [PATCH] fix(config): drop 'vcs.modified' when resolving version Co-authored-by: sindrerh2 --- pkg/config/config.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index de5c1ae..a1e974c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -205,7 +205,6 @@ func resolveVersion() { commit := "unknown" commitDate := time.Now() - uncommittedChanges := true for _, kv := range info.Settings { switch kv.Key { @@ -213,12 +212,6 @@ func resolveVersion() { commit = kv.Value case "vcs.time": commitDate, _ = time.Parse(time.RFC3339, kv.Value) - case "vcs.modified": - if kv.Value == "true" { - uncommittedChanges = true - } else if kv.Value == "false" { - uncommittedChanges = false - } } } @@ -227,10 +220,6 @@ func resolveVersion() { } version := fmt.Sprintf("%s-%s", commitDate.Format("2006-01-02-150405"), commit) - if uncommittedChanges { - version += "-dirty" - } - viper.Set("version", version) logger.Infof("config: starting wonderwall version %q built with %q", version, runtime.Version()) }