File tree 1 file changed +13
-11
lines changed
1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,19 @@ GOFMT ?= gofmt -s
21
21
GOFLAGS := -i -v
22
22
EXTRA_GOFLAGS ?=
23
23
24
- LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//') " -X "main.Tags=$(TAGS ) "
24
+ ifneq ($(DRONE_TAG ) ,)
25
+ VERSION ?= $(subst v,,$(DRONE_TAG))
26
+ GITEA_VERSION := $(VERSION)
27
+ else
28
+ ifneq ($(DRONE_BRANCH),)
29
+ VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
30
+ else
31
+ VERSION ?= master
32
+ endif
33
+ GITEA_VERSION := $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
34
+ endif
35
+
36
+ LDFLAGS := -X "main.Version=$(GITEA_VERSION ) " -X "main.Tags=$(TAGS ) "
25
37
26
38
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations,$(shell $(GO ) list ./... | grep -v /vendor/) )
27
39
SOURCES ?= $(shell find . -name "* .go" -type f)
45
57
EXECUTABLE := gitea
46
58
endif
47
59
48
- ifneq ($(DRONE_TAG ) ,)
49
- VERSION ?= $(subst v,,$(DRONE_TAG))
50
- else
51
- ifneq ($(DRONE_BRANCH),)
52
- VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
53
- else
54
- VERSION ?= master
55
- endif
56
- endif
57
-
58
60
.PHONY : all
59
61
all : build
60
62
You can’t perform that action at this time.
0 commit comments