@@ -28,25 +28,23 @@ MAKE_VERSION := $(shell make -v | head -n 1)
28
28
29
29
ifneq ($(DRONE_TAG ) ,)
30
30
VERSION ?= $(subst v,,$(DRONE_TAG))
31
- GITEA_VERSION ?= $(VERSION)
31
+ TEA_VERSION ?= $(VERSION)
32
32
else
33
33
ifneq ($(DRONE_BRANCH),)
34
34
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
35
35
else
36
36
VERSION ?= master
37
37
endif
38
- GITEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
38
+ TEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
39
39
endif
40
40
41
- LDFLAGS := -X "main.MakeVersion= $( MAKE_VERSION ) " -X "main. Version=$(GITEA_VERSION ) " -X "main.Tags=$(TAGS ) "
41
+ LDFLAGS := -X "main.Version=$(TEA_VERSION ) " -X "main.Tags=$(TAGS ) "
42
42
43
- PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test, $( filter-out code.gitea.io/gitea/integrations, $( shell $(GO ) list ./... | grep -v /vendor/) ) )
43
+ PACKAGES ?= $(shell $(GO ) list ./... | grep -v /vendor/)
44
44
SOURCES ?= $(shell find . -name "* .go" -type f)
45
45
46
46
TAGS ?=
47
47
48
- TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'gitea-temp')
49
-
50
48
ifeq ($(OS ) , Windows_NT)
51
49
EXECUTABLE := tea.exe
52
50
else
@@ -62,7 +60,7 @@ all: build
62
60
.PHONY : clean
63
61
clean :
64
62
$(GO ) clean -i ./...
65
- rm -rf $(EXECUTABLE ) $(DIST ) $( BINDATA )
63
+ rm -rf $(EXECUTABLE ) $(DIST )
66
64
67
65
.PHONY : fmt
68
66
fmt :
@@ -119,7 +117,7 @@ coverage:
119
117
@hash gocovmerge > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
120
118
$(GO ) get -u github.com/wadey/gocovmerge; \
121
119
fi
122
- gocovmerge integration.coverage.out $(shell find . -type f -name "coverage.out") > coverage.all; \
120
+ gocovmerge $(shell find . -type f -name "coverage.out") > coverage.all; \
123
121
124
122
.PHONY : unit-test-coverage
125
123
unit-test-coverage :
@@ -163,7 +161,7 @@ release-windows:
163
161
@hash xgo > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
164
162
$(GO ) get -u src.techknowlogick.com/xgo; \
165
163
fi
166
- xgo -dest $(DIST ) /binaries -tags ' netgo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' windows/*' -out gitea -$(VERSION ) .
164
+ xgo -dest $(DIST ) /binaries -tags ' netgo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' windows/*' -out tea -$(VERSION ) .
167
165
ifeq ($(CI ) ,drone)
168
166
cp /build/* $(DIST)/binaries
169
167
endif
@@ -173,7 +171,7 @@ release-linux:
173
171
@hash xgo > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
174
172
$(GO ) get -u src.techknowlogick.com/xgo; \
175
173
fi
176
- xgo -dest $(DIST ) /binaries -tags ' netgo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' linux/*' -out gitea -$(VERSION ) .
174
+ xgo -dest $(DIST ) /binaries -tags ' netgo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' linux/*' -out tea -$(VERSION ) .
177
175
ifeq ($(CI ) ,drone)
178
176
cp /build/* $(DIST)/binaries
179
177
endif
@@ -183,7 +181,7 @@ release-darwin:
183
181
@hash xgo > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
184
182
$(GO ) get -u src.techknowlogick.com/xgo; \
185
183
fi
186
- xgo -dest $(DIST ) /binaries -tags ' netgo $(TAGS)' -ldflags ' $(LDFLAGS)' -targets ' darwin/*' -out gitea -$(VERSION ) .
184
+ xgo -dest $(DIST ) /binaries -tags ' netgo $(TAGS)' -ldflags ' $(LDFLAGS)' -targets ' darwin/*' -out tea -$(VERSION ) .
187
185
ifeq ($(CI ) ,drone)
188
186
cp /build/* $(DIST)/binaries
189
187
endif
0 commit comments