diff --git a/build.sh b/build.sh index bde1b21..af9d58e 100644 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ single_build() { # GOARCH/GOOS supplied in function env go build \ -a \ - -ldflags '-s -w' \ + -ldflags "-s -w -X main.VERSION=nmdc-webfrontend/${version}" \ -gcflags "-trimpath=${GOPATH}" \ -asmflags "-trimpath=${GOPATH}" \ -o "$(pathfix "${tmpdir}/${local_bin_name}")" diff --git a/main.go b/main.go index 09db542..6ae8d2b 100644 --- a/main.go +++ b/main.go @@ -12,9 +12,7 @@ import ( "github.com/googollee/go-socket.io" ) -const ( - VERSION = `nmdc-webfrontend/1.1.2` -) +var VERSION string = `nmdc-webfrontend/devel-unreleased` type App struct { cfg *Config