Skip to content

Commit 25c49cf

Browse files
typelesslunny
authored andcommitted
Update build tags for sqlite_unlock_notify (go-gitea#5144)
1 parent 2ce72d4 commit 25c49cf

File tree

7 files changed

+24
-23
lines changed

7 files changed

+24
-23
lines changed

.drone.yml

+16-15
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pipeline:
6767
image: golang:1.11
6868
pull: true
6969
environment:
70-
TAGS: bindata sqlite
70+
TAGS: bindata sqlite sqlite_unlock_notify
7171
commands:
7272
- make clean
7373
- make generate
@@ -87,7 +87,7 @@ pipeline:
8787
pull: true
8888
group: test
8989
environment:
90-
TAGS: bindata sqlite
90+
TAGS: bindata sqlite sqlite_unlock_notify
9191
commands:
9292
- make unit-test-coverage
9393
when:
@@ -99,7 +99,7 @@ pipeline:
9999
pull: true
100100
group: test
101101
environment:
102-
TAGS: bindata sqlite
102+
TAGS: bindata sqlite sqlite_unlock_notify
103103
commands:
104104
- make test
105105
when:
@@ -117,17 +117,18 @@ pipeline:
117117
when:
118118
event: [ tag ]
119119

120-
# Commented until db locking have been resolved!
121-
# test-sqlite:
122-
# image: golang:1.10
123-
# pull: true
124-
# group: test
125-
# environment:
126-
# TAGS: bindata
127-
# commands:
128-
# - make test-sqlite
129-
# when:
130-
# event: [ push, tag, pull_request ]
120+
test-sqlite:
121+
image: golang:1.11
122+
pull: true
123+
group: test
124+
environment:
125+
TAGS: bindata
126+
commands:
127+
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
128+
- apt-get install -y git-lfs
129+
- make test-sqlite
130+
when:
131+
event: [ push, tag, pull_request ]
131132

132133
test-mysql:
133134
image: golang:1.11
@@ -196,7 +197,7 @@ pipeline:
196197
image: karalabe/xgo-latest:latest
197198
pull: true
198199
environment:
199-
TAGS: bindata sqlite
200+
TAGS: bindata sqlite sqlite_unlock_notify
200201
commands:
201202
- export PATH=$PATH:$GOPATH/bin
202203
- make release

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
FROM golang:1.10-alpine3.7 AS build-env
55

66
ARG GITEA_VERSION
7-
ARG TAGS="sqlite"
7+
ARG TAGS="sqlite sqlite_unlock_notify"
88
ENV TAGS "bindata $TAGS"
99

1010
#Build deps

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ fmt-check:
159159

160160
.PHONY: test
161161
test:
162-
$(GO) test -tags=sqlite $(PACKAGES)
162+
$(GO) test -tags='sqlite sqlite_unlock_notify' $(PACKAGES)
163163

164164
.PHONY: coverage
165165
coverage:
@@ -170,7 +170,7 @@ coverage:
170170

171171
.PHONY: unit-test-coverage
172172
unit-test-coverage:
173-
for PKG in $(PACKAGES); do $(GO) test -tags=sqlite -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
173+
for PKG in $(PACKAGES); do $(GO) test -tags='sqlite sqlite_unlock_notify' -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
174174

175175
.PHONY: vendor
176176
vendor:
@@ -234,7 +234,7 @@ integrations.test: $(SOURCES)
234234
$(GO) test -c code.gitea.io/gitea/integrations -o integrations.test
235235

236236
integrations.sqlite.test: $(SOURCES)
237-
$(GO) test -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags 'sqlite'
237+
$(GO) test -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags 'sqlite sqlite_unlock_notify'
238238

239239
integrations.cover.test: $(SOURCES)
240240
$(GO) test -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(PACKAGES) | tr ' ' ',') -o integrations.cover.test

contrib/ide/vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"type": "go",
2020
"request": "launch",
2121
"mode": "debug",
22-
"buildFlags": "-tags=\"sqlite\"",
22+
"buildFlags": "-tags=\"sqlite sqlite_unlock_notify\"",
2323
"port": 2345,
2424
"host": "127.0.0.1",
2525
"program": "${workspaceRoot}/main.go",

contrib/ide/vscode/tasks.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"focus": false,
3636
"panel": "shared"
3737
},
38-
"args": ["build", "-tags=\"sqlite\""],
38+
"args": ["build", "-tags=\"sqlite sqlite_unlock_notify\""],
3939
"linux": {
4040
"args": ["-o", "gitea", "${workspaceRoot}/main.go"]
4141
},

docker/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
88
.PHONY: docker
99
docker:
1010
docker build --disable-content-trust=false -t $(DOCKER_REF) .
11-
# support also build args docker build --build-arg GITEA_VERSION=v1.2.3 --build-arg TAGS="bindata sqlite" .
11+
# support also build args docker build --build-arg GITEA_VERSION=v1.2.3 --build-arg TAGS="bindata sqlite sqlite_unlock_notify" .
1212

1313
.PHONY: docker-build
1414
docker-build:

snap/snapcraft.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ parts:
6767
export GOPATH=$SNAPCRAFT_PART_INSTALL/../go
6868
go get -u github.com/jteeuwen/go-bindata/...
6969
cd $GOPATH/src/code.gitea.io/gitea
70-
TAGS="bindata sqlite pam cert" make generate build
70+
TAGS="bindata sqlite sqlite_unlock_notify pam cert" make generate build
7171
install: |
7272
# Set Convenience Variables
7373
src=$SNAPCRAFT_PART_INSTALL/../go/src/code.gitea.io/gitea

0 commit comments

Comments
 (0)