From 91a87f065ee546f82fc3448547a9aa51efb2ef34 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 13 Aug 2017 16:54:28 +1200 Subject: [PATCH] set version from makefile --- ArchiveServer.go | 4 ++-- Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ArchiveServer.go b/ArchiveServer.go index cd69bf3..a062448 100644 --- a/ArchiveServer.go +++ b/ArchiveServer.go @@ -7,8 +7,8 @@ import ( "time" ) -const ( - SERVER_VERSION = "archive/3.0" +var ( + SERVER_VERSION = "archive/0.0.0" ) type ArchiveServer struct { diff --git a/Makefile b/Makefile index 468f3e8..c19d004 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ SOURCES:=Makefile \ cmd $(wildcard cmd/archive-server/*.go) \ $(wildcard *.go) -GOFLAGS := -ldflags='-s -w' -gcflags='-trimpath=$(GOPATH)' -asmflags='-trimpath=$(GOPATH)' +GOFLAGS := -ldflags='-s -w -X archive.SERVER_VERSION="archive/${VERSION}"' -gcflags='-trimpath=$(GOPATH)' -asmflags='-trimpath=$(GOPATH)' # # Phony targets