diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-12-13 05:48:58 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-13 12:48:58 +0800 |
commit | 1d1c01875dc4f07b204a40aa662aa1782bf000fd (patch) | |
tree | cdeed3ba917dfd68951e93d60e4738e08f419316 /Makefile | |
parent | f0a989c1d0843ab47a48be5219470a93a462e302 (diff) | |
download | gitea-1d1c01875dc4f07b204a40aa662aa1782bf000fd.tar.gz gitea-1d1c01875dc4f07b204a40aa662aa1782bf000fd.zip |
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
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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/) |