Skip to content

Commit c480fa6

Browse files
committed
Revert "add make version on gitea version (go-gitea#6485)"
Seems like clutter to me This reverts commit 0a8e63c.
1 parent 42f9886 commit c480fa6

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ EXTRA_GOFLAGS ?=
2828

2929
TAGS ?=
3030

31-
MAKE_VERSION := $(shell make -v | head -n 1)
32-
3331
ifneq ($(DRONE_TAG),)
3432
VERSION ?= $(subst v,,$(DRONE_TAG))
3533
GITEA_VERSION ?= $(VERSION)
@@ -42,7 +40,7 @@ else
4240
GITEA_VERSION ?= $(shell git describe --tags --dirty=+ | sed 's/^v//')
4341
endif
4442

45-
LDFLAGS := -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"
43+
LDFLAGS := -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"
4644

4745
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell $(GO) list ./... | grep -v /vendor/)))
4846
SOURCES ?= $(shell find . -name "*.go" -type f)

main.go

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@ import (
2323
"github.com/urfave/cli"
2424
)
2525

26-
var (
27-
// Version holds the current Gitea version
28-
Version = "1.9.0-dev"
29-
// Tags holds the build tags used
30-
Tags = ""
31-
// MakeVersion holds the current Make version if built with make
32-
MakeVersion = ""
33-
)
26+
// Version holds the current Gitea version
27+
var Version = "1.5.0-dev"
28+
29+
// Tags holds the build tags used
30+
var Tags = ""
3431

3532
func init() {
3633
setting.AppVer = Version
@@ -60,14 +57,10 @@ func main() {
6057
}
6158
}
6259

63-
func formatBuiltWith(makeTags string) string {
64-
var version = runtime.Version()
65-
if len(MakeVersion) > 0 {
66-
version = MakeVersion + ", " + runtime.Version()
67-
}
60+
func formatBuiltWith(Tags string) string {
6861
if len(Tags) == 0 {
69-
return " built with " + version
62+
return " built with " + runtime.Version()
7063
}
7164

72-
return " built with " + version + " : " + strings.Replace(Tags, " ", ", ", -1)
65+
return " built with " + runtime.Version() + " : " + strings.Replace(Tags, " ", ", ", -1)
7366
}

0 commit comments

Comments
 (0)