at master 37 lines 780 B view raw
1diff --git a/version/version.go b/version/version.go 2index 9ca8aba..d9bd968 100644 3--- a/version/version.go 4+++ b/version/version.go 5@@ -4,9 +4,6 @@ package version 6 7 import ( 8 "fmt" 9- "runtime/debug" 10- 11- "github.com/Masterminds/semver/v3" 12 ) 13 14 // Version supplies the semantic version. 15@@ -14,20 +11,8 @@ var Version string 16 17 // String prints the build information for the bot. 18 func String() string { 19- hash := "unknown" 20- 21- _, err := semver.NewVersion(Version) 22- if err != nil { 23- Version = "dev" 24- } 25- 26- if info, ok := debug.ReadBuildInfo(); ok { 27- for _, s := range info.Settings { 28- if s.Key == "vcs.revision" { 29- hash = s.Value 30- } 31- } 32- } 33+ Version = "@version@" 34+ hash := "@vcsHash@" 35 36 return fmt.Sprintf("Version : %s\nGit Hash: %s\n", Version, hash) 37 }