mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 17:43:05 +00:00
Merge pull request #32 from mrvdb/versioninfo
Get versioninfo from the git repository
This commit is contained in:
commit
a4751c7abf
2 changed files with 10 additions and 6 deletions
9
Makefile
9
Makefile
|
@ -1,7 +1,10 @@
|
||||||
|
GITREV=`git describe --tags | cut -c 2-`
|
||||||
|
LDFLAGS=-ldflags="-X 'github.com/writeas/writefreely.softwareVer=$(GITREV)'"
|
||||||
|
|
||||||
GOCMD=go
|
GOCMD=go
|
||||||
GOINSTALL=$(GOCMD) install
|
GOINSTALL=$(GOCMD) install $(LDFLAGS)
|
||||||
GOBUILD=$(GOCMD) build
|
GOBUILD=$(GOCMD) build $(LDFLAGS)
|
||||||
GOTEST=$(GOCMD) test
|
GOTEST=$(GOCMD) test $(LDFLAGS)
|
||||||
GOGET=$(GOCMD) get
|
GOGET=$(GOCMD) get
|
||||||
BINARY_NAME=writefreely
|
BINARY_NAME=writefreely
|
||||||
|
|
||||||
|
|
5
app.go
5
app.go
|
@ -33,10 +33,11 @@ const (
|
||||||
|
|
||||||
serverSoftware = "WriteFreely"
|
serverSoftware = "WriteFreely"
|
||||||
softwareURL = "https://writefreely.org"
|
softwareURL = "https://writefreely.org"
|
||||||
|
|
||||||
softwareVer = "0.3"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Software version can be set from git env using -ldflags
|
||||||
|
var softwareVer = "0.3"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
debugging bool
|
debugging bool
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue