Skip to content

Commit 3861150

Browse files
committed
Fixes
1 parent 61ea91e commit 3861150

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ JAVASCRIPTS :=
1111

1212
VERSION = $(shell git describe --tags --always)
1313

14-
LDFLAGS += -X "code.gitea.io/gitea.Version=$(VERSION)"
15-
LDFLAGS += -X "code.gitea.io/gitea/modules/setting.BuildTime=$(DATE)"
16-
LDFLAGS += -X "code.gitea.io/gitea/modules/setting.BuildGitHash=$(SHA)"
14+
LDFLAGS += -X "main.Version=$(VERSION)"
1715

1816
TARGETS ?= linux/*,darwin/*,windows/*
1917
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
@@ -37,6 +35,7 @@ all: build
3735
clean:
3836
go clean -i ./...
3937
rm -rf $(EXECUTABLE) $(DIST)
38+
rm templates/.VERSION
4039

4140
.PHONY: fmt
4241
fmt:
@@ -87,11 +86,14 @@ install: $(wildcard *.go)
8786
go install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
8887

8988
.PHONY: build
90-
build: $(EXECUTABLE)
89+
build: $(EXECUTABLE) templates/.VERSION
9190

9291
$(EXECUTABLE): $(wildcard *.go)
9392
go build -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
9493

94+
templates/.VERSION:
95+
echo -n $(VERSION) > $@
96+
9597
.PHONY: release
9698
release: release-build release-copy release-check
9799

templates/.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.99.0915
1+
v0.9.99-212-g2c92e45

0 commit comments

Comments
 (0)