File tree 3 files changed +4
-12
lines changed
3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,9 @@ BINDATA := $(shell find conf | sed 's/ /\\ /g')
9
9
STYLESHEETS := $(wildcard public/less/index.less public/less/_* .less)
10
10
JAVASCRIPTS :=
11
11
12
- LDFLAGS += -X "code.gitea.io/gitea/modules/setting.BuildTime=$(DATE ) "
13
- LDFLAGS += -X "code.gitea.io/gitea/modules/setting.BuildGitHash=$(SHA ) "
12
+ VERSION = $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
13
+
14
+ LDFLAGS += -X "main.Version=$(VERSION ) "
14
15
15
16
TARGETS ?= linux/*,darwin/*,windows/*
16
17
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import (
18
18
)
19
19
20
20
// Version holds the current Gitea version
21
- const Version = "0.9.99.0915 "
21
+ var Version = "1.0.0+dev "
22
22
23
23
func init () {
24
24
runtime .GOMAXPROCS (runtime .NumCPU ())
Original file line number Diff line number Diff line change @@ -53,10 +53,6 @@ const (
53
53
54
54
// settings
55
55
var (
56
- // BuildTime information should only be set by -ldflags.
57
- BuildTime string
58
- BuildGitHash string
59
-
60
56
// AppVer settings
61
57
AppVer string
62
58
AppName string
@@ -642,11 +638,6 @@ var logLevels = map[string]string{
642
638
func newLogService () {
643
639
log .Info ("%s %s" , AppName , AppVer )
644
640
645
- if len (BuildTime ) > 0 {
646
- log .Info ("Build Time: %s" , BuildTime )
647
- log .Info ("Build Git Hash: %s" , BuildGitHash )
648
- }
649
-
650
641
// Get and check log mode.
651
642
LogModes = strings .Split (Cfg .Section ("log" ).Key ("MODE" ).MustString ("console" ), "," )
652
643
LogConfigs = make ([]string , len (LogModes ))
You can’t perform that action at this time.
0 commit comments