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:
Kim "BKC" Carlbäcker 2016-12-13 05:48:58 +01:00 committed by Lunny Xiao
parent f0a989c1d0
commit 1d1c01875d
3 changed files with 4 additions and 12 deletions

View file

@ -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/)