set version from makefile

This commit is contained in:
mappu 2017-08-13 16:54:28 +12:00
parent 564f12f4c7
commit 91a87f065e
2 changed files with 3 additions and 3 deletions

View File

@ -7,8 +7,8 @@ import (
"time"
)
const (
SERVER_VERSION = "archive/3.0"
var (
SERVER_VERSION = "archive/0.0.0"
)
type ArchiveServer struct {

View File

@ -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