mirror of
https://github.com/go-gitea/gitea
synced 2025-08-01 23:28:36 +00:00
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:
committed by
Lunny Xiao
parent
f0a989c1d0
commit
1d1c01875d
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/)
|
||||
|
Reference in New Issue
Block a user