Autogenerate Version on build (#190)
* Autogenerate Version On Build * Fixes * Changed Version to v0.9.0 * balls * I hate newlines * Don't remove .VERSION-file on `make clean` * v0.9.0 => 1.0.0 * damn new-lines... * Always rebuild templates/.VERSION * Delete .VERSION * Update Makefile
This commit is contained in:
parent
f0a989c1d0
commit
1d1c01875d
3 changed files with 4 additions and 12 deletions
5
Makefile
5
Makefile
|
@ -9,8 +9,9 @@ BINDATA := $(shell find conf | sed 's/ /\\ /g')
|
|||
STYLESHEETS := $(wildcard public/less/index.less public/less/_*.less)
|
||||
JAVASCRIPTS :=
|
||||
|
||||
LDFLAGS += -X "code.gitea.io/gitea/modules/setting.BuildTime=$(DATE)"
|
||||
LDFLAGS += -X "code.gitea.io/gitea/modules/setting.BuildGitHash=$(SHA)"
|
||||
VERSION = $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
||||
|
||||
LDFLAGS += -X "main.Version=$(VERSION)"
|
||||
|
||||
TARGETS ?= linux/*,darwin/*,windows/*
|
||||
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue