mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Update version string building
This commit is contained in:
parent
a6a4a70996
commit
dd8e928698
@ -21,16 +21,15 @@ var (
|
||||
)
|
||||
|
||||
func BuildVersionString() string {
|
||||
osArch := runtime.GOOS + "/" + runtime.GOARCH
|
||||
|
||||
if version == "" {
|
||||
return fmt.Sprintf("%s SNAPSHOT %s", programName, osArch)
|
||||
}
|
||||
|
||||
if commitHash != "" {
|
||||
version += "+" + strings.ToUpper(commitHash)
|
||||
}
|
||||
|
||||
osArch := runtime.GOOS + "/" + runtime.GOARCH
|
||||
|
||||
date := buildDate
|
||||
if date == "" {
|
||||
date = "unknown"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s %s %s BuildDate: %s", programName, version, osArch, date)
|
||||
return fmt.Sprintf("%s %s %s BuildDate: %s", programName, version, osArch, buildDate)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user