Merge pull request #32 from mrvdb/versioninfo

Get versioninfo from the git repository
This commit is contained in:
Matt Baer 2018-11-20 12:18:18 -05:00 committed by GitHub
commit a4751c7abf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View file

@ -1,7 +1,10 @@
GITREV=`git describe --tags | cut -c 2-`
LDFLAGS=-ldflags="-X 'github.com/writeas/writefreely.softwareVer=$(GITREV)'"
GOCMD=go
GOINSTALL=$(GOCMD) install
GOBUILD=$(GOCMD) build
GOTEST=$(GOCMD) test
GOINSTALL=$(GOCMD) install $(LDFLAGS)
GOBUILD=$(GOCMD) build $(LDFLAGS)
GOTEST=$(GOCMD) test $(LDFLAGS)
GOGET=$(GOCMD) get
BINARY_NAME=writefreely

5
app.go
View file

@ -33,10 +33,11 @@ const (
serverSoftware = "WriteFreely"
softwareURL = "https://writefreely.org"
softwareVer = "0.3"
)
// Software version can be set from git env using -ldflags
var softwareVer = "0.3"
var (
debugging bool