From 021e3e307bfa1afd872c5b0f54428f6f8b21a74e Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 18 Jun 2020 19:26:53 +0200 Subject: [PATCH] Remove build date from binary --- Makefile | 2 +- pkg/cmd/version.go | 1 - pkg/cmd/web.go | 2 +- pkg/version/version.go | 3 --- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 2ac28fa580..3baafaf31c 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ GOFMT ?= gofmt -s GOFLAGS := -v -mod=vendor EXTRA_GOFLAGS ?= -LDFLAGS := -X "code.vikunja.io/api/pkg/version.Version=$(shell git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')" -X "main.Tags=$(TAGS)" -X "code.vikunja.io/api/pkg/version.BuildTime=$(shell date -R)" +LDFLAGS := -X "code.vikunja.io/api/pkg/version.Version=$(shell git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')" -X "main.Tags=$(TAGS)" PACKAGES ?= $(filter-out code.vikunja.io/api/pkg/integrations,$(shell go list -mod=vendor ./... | grep -v /vendor/)) SOURCES ?= $(shell find . -name "*.go" -type f) diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go index cb3c5fcae3..3856aef92a 100644 --- a/pkg/cmd/version.go +++ b/pkg/cmd/version.go @@ -31,6 +31,5 @@ var versionCmd = &cobra.Command{ Short: "Print the version number of Vikunja", Run: func(cmd *cobra.Command, args []string) { fmt.Printf("Vikunja api version %s\n", version.Version) - fmt.Printf("Built at %s\n", version.BuildTime) }, } diff --git a/pkg/cmd/web.go b/pkg/cmd/web.go index 2761b86ae1..c293510902 100644 --- a/pkg/cmd/web.go +++ b/pkg/cmd/web.go @@ -42,7 +42,7 @@ var webCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { // Version notification - log.Infof("Vikunja version %s, built at %s", version.Version, version.BuildTime) + log.Infof("Vikunja version %s", version.Version) // Additional swagger information swagger.SwaggerInfo.Version = version.Version diff --git a/pkg/version/version.go b/pkg/version/version.go index f0b55a1601..6e55a28ba4 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -21,6 +21,3 @@ package version // Version sets the version to be printed to the user. Gets overwritten by "make release" or "make build" with last git commit or tag. var Version = "0.7" - -// BuildTime contains the build time of vikunja. -var BuildTime = ""