From 8740ad76f425df5f3a2ecc48d98881619030d9a0 Mon Sep 17 00:00:00 2001 From: Thomas Rudin Date: Tue, 8 Jan 2019 08:47:28 +0100 Subject: [PATCH] embedded version --- Makefile | 5 +---- main.go | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index ed9e146..fc97da5 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,6 @@ -VERSION=2.0 -LDFLAGS=-ldflags "-w -s -X main.Version=${VERSION}" - test: go test ./... build: - go build ${LDFLAGS} + go build diff --git a/main.go b/main.go index 2d1e095..adeae49 100644 --- a/main.go +++ b/main.go @@ -7,8 +7,8 @@ import ( "fmt" ) -var ( - Version string +const ( + Version = "2.0-DEV" ) func main() { @@ -21,9 +21,6 @@ func main() { if p.Version { fmt.Print("Mapserver version: ") - if Version == "" { - Version = "SNAPSHOT" - } fmt.Println(Version) return }