diff --git a/Makefile b/Makefile index c4606e6..f152056 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,7 @@ $(BINS): $(DIRS) dep CGO_ENABLED=0 \ GO111MODULE=on \ go build -v -trimpath \ - -ldflags "-X main.Version=$(VERSION) \ - -X main.Build=$(BUILD)" \ + -ldflags "-X main.Version=$(VERSION)" \ -o $@ ./ $(DIRS): diff --git a/misc.go b/misc.go index d207131..e82945a 100644 --- a/misc.go +++ b/misc.go @@ -5,8 +5,6 @@ package main const Prefix = "HTTP_GW" var ( - // Build is a timestamp set during gateway build. - Build = "now" // Version is gateway version. Version = "dev" ) diff --git a/settings.go b/settings.go index 1e5555c..4642cb0 100644 --- a/settings.go +++ b/settings.go @@ -64,9 +64,8 @@ const ( cfgPeers = "peers" // Application. - cfgApplicationName = "app.name" - cfgApplicationVersion = "app.version" - cfgApplicationBuildTime = "app.build_time" + cfgApplicationName = "app.name" + cfgApplicationVersion = "app.version" // Command line args. cmdHelp = "help" @@ -78,12 +77,11 @@ const ( ) var ignore = map[string]struct{}{ - cfgApplicationName: {}, - cfgApplicationVersion: {}, - cfgApplicationBuildTime: {}, - cfgPeers: {}, - cmdHelp: {}, - cmdVersion: {}, + cfgApplicationName: {}, + cfgApplicationVersion: {}, + cfgPeers: {}, + cmdHelp: {}, + cmdVersion: {}, } func (empty) Read([]byte) (int, error) { return 0, io.EOF } @@ -164,7 +162,7 @@ func settings() *viper.Viper { switch { case help != nil && *help: - fmt.Printf("NeoFS HTTP Gateway %s (%s)\n", Version, Build) + fmt.Printf("NeoFS HTTP Gateway %s\n", Version) flags.PrintDefaults() fmt.Println() @@ -191,7 +189,7 @@ func settings() *viper.Viper { os.Exit(0) case version != nil && *version: - fmt.Printf("NeoFS HTTP Gateway %s (%s)\n", Version, Build) + fmt.Printf("NeoFS HTTP Gateway %s\n", Version) os.Exit(0) }