fix: allow version to be overwritten by build again (#4656)

This commit is contained in:
Livio Spring
2022-11-07 10:50:44 +01:00
committed by GitHub
parent 41c043bcd9
commit 5ac956b0f1
2 changed files with 6 additions and 2 deletions

View File

@@ -3,13 +3,17 @@ package build
import "time"
var (
version = time.Now().Format(time.RFC3339)
version = ""
commit = ""
date = ""
dateTime time.Time
)
func Version() string {
if version != "" {
return version
}
version = Date().Format(time.RFC3339)
return version
}