cmd/*, lib/build: Set correct LongVersion (fixes #5993) (#5997)

The relay and discosrv didn't use the new lib/build package, now they
do. Conversely the lib/build package wasn't aware there might be other
users and hard coded the program name - now it's set by the build
script
This commit is contained in:
Jakob Borg
2019-10-07 13:30:25 +02:00
committed by GitHub
parent 999d4a0e23
commit 67b8ef1f3e
7 changed files with 65 additions and 113 deletions

View File

@@ -14,7 +14,6 @@ import (
"log"
"os"
"reflect"
"strings"
"github.com/AudriusButkevicius/recli"
"github.com/flynn-archive/go-shlex"
@@ -128,7 +127,7 @@ func main() {
app.HelpName = app.Name
app.Author = "The Syncthing Authors"
app.Usage = "Syncthing command line interface"
app.Version = strings.Replace(build.LongVersion, "syncthing", app.Name, 1)
app.Version = build.Version
app.Flags = fakeFlags
app.Metadata = map[string]interface{}{
"client": client,