Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / fl / flottbot / version.patch
blobeaec6eec5fdbc2d5c795a8323f5050b7cc417b9e
1 diff --git a/version/version.go b/version/version.go
2 index 9ca8aba..d9bd968 100644
3 --- a/version/version.go
4 +++ b/version/version.go
5 @@ -4,9 +4,6 @@ package version
7 import (
8 "fmt"
9 - "runtime/debug"
11 - "github.com/Masterminds/semver/v3"
14 // Version supplies the semantic version.
15 @@ -14,20 +11,8 @@ var Version string
17 // String prints the build information for the bot.
18 func String() string {
19 - hash := "unknown"
21 - _, err := semver.NewVersion(Version)
22 - if err != nil {
23 - Version = "dev"
24 - }
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@"
36 return fmt.Sprintf("Version : %s\nGit Hash: %s\n", Version, hash)