Skip to content
This repository was archived by the owner on May 24, 2019. It is now read-only.

Commit 6aa4629

Browse files
lunnylafriks
authored andcommitted
fix drone (#21)
* fix drone * remove docker on drone
1 parent d4f107b commit 6aa4629

File tree

2 files changed

+9
-42
lines changed

2 files changed

+9
-42
lines changed

.drone.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -81,37 +81,6 @@ pipeline:
8181
when:
8282
event: [ push, tag ]
8383

84-
85-
docker-dryrun:
86-
image: plugins/docker:17.12
87-
pull: true
88-
repo: gitea/tea
89-
cache_from: gitea/tea
90-
dry_run: true
91-
when:
92-
event: [ pull_request ]
93-
94-
release-docker:
95-
image: plugins/docker:17.12
96-
pull: true
97-
secrets: [ docker_username, docker_password ]
98-
repo: gitea/tea
99-
tags: [ '${DRONE_BRANCH##release/v}' ]
100-
cache_from: gitea/tea
101-
when:
102-
event: [ push ]
103-
branch: [ release/* ]
104-
105-
docker:
106-
image: plugins/docker:17.12
107-
secrets: [ docker_username, docker_password ]
108-
pull: true
109-
repo: gitea/tea
110-
cache_from: gitea/tea
111-
default_tags: true
112-
when:
113-
event: [ push, tag ]
114-
11584
gpg-sign:
11685
image: plugins/gpgsign:1
11786
pull: true

Makefile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,23 @@ MAKE_VERSION := $(shell make -v | head -n 1)
2828

2929
ifneq ($(DRONE_TAG),)
3030
VERSION ?= $(subst v,,$(DRONE_TAG))
31-
GITEA_VERSION ?= $(VERSION)
31+
TEA_VERSION ?= $(VERSION)
3232
else
3333
ifneq ($(DRONE_BRANCH),)
3434
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
3535
else
3636
VERSION ?= master
3737
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//')
3939
endif
4040

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)"
4242

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/)
4444
SOURCES ?= $(shell find . -name "*.go" -type f)
4545

4646
TAGS ?=
4747

48-
TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'gitea-temp')
49-
5048
ifeq ($(OS), Windows_NT)
5149
EXECUTABLE := tea.exe
5250
else
@@ -62,7 +60,7 @@ all: build
6260
.PHONY: clean
6361
clean:
6462
$(GO) clean -i ./...
65-
rm -rf $(EXECUTABLE) $(DIST) $(BINDATA)
63+
rm -rf $(EXECUTABLE) $(DIST)
6664

6765
.PHONY: fmt
6866
fmt:
@@ -119,7 +117,7 @@ coverage:
119117
@hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
120118
$(GO) get -u github.com/wadey/gocovmerge; \
121119
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;\
123121

124122
.PHONY: unit-test-coverage
125123
unit-test-coverage:
@@ -163,7 +161,7 @@ release-windows:
163161
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
164162
$(GO) get -u src.techknowlogick.com/xgo; \
165163
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) .
167165
ifeq ($(CI),drone)
168166
cp /build/* $(DIST)/binaries
169167
endif
@@ -173,7 +171,7 @@ release-linux:
173171
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
174172
$(GO) get -u src.techknowlogick.com/xgo; \
175173
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) .
177175
ifeq ($(CI),drone)
178176
cp /build/* $(DIST)/binaries
179177
endif
@@ -183,7 +181,7 @@ release-darwin:
183181
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
184182
$(GO) get -u src.techknowlogick.com/xgo; \
185183
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) .
187185
ifeq ($(CI),drone)
188186
cp /build/* $(DIST)/binaries
189187
endif

0 commit comments

Comments
 (0)