Skip to content

Commit

Permalink
Update build tags for sqlite_unlock_notify (go-gitea#5144)
Browse files Browse the repository at this point in the history
  • Loading branch information
typeless authored and lunny committed Oct 23, 2018
1 parent 2ce72d4 commit 25c49cf
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 23 deletions.
31 changes: 16 additions & 15 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pipeline:
image: golang:1.11
pull: true
environment:
TAGS: bindata sqlite
TAGS: bindata sqlite sqlite_unlock_notify
commands:
- make clean
- make generate
Expand All @@ -87,7 +87,7 @@ pipeline:
pull: true
group: test
environment:
TAGS: bindata sqlite
TAGS: bindata sqlite sqlite_unlock_notify
commands:
- make unit-test-coverage
when:
Expand All @@ -99,7 +99,7 @@ pipeline:
pull: true
group: test
environment:
TAGS: bindata sqlite
TAGS: bindata sqlite sqlite_unlock_notify
commands:
- make test
when:
Expand All @@ -117,17 +117,18 @@ pipeline:
when:
event: [ tag ]

# Commented until db locking have been resolved!
# test-sqlite:
# image: golang:1.10
# pull: true
# group: test
# environment:
# TAGS: bindata
# commands:
# - make test-sqlite
# when:
# event: [ push, tag, pull_request ]
test-sqlite:
image: golang:1.11
pull: true
group: test
environment:
TAGS: bindata
commands:
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
- apt-get install -y git-lfs
- make test-sqlite
when:
event: [ push, tag, pull_request ]

test-mysql:
image: golang:1.11
Expand Down Expand Up @@ -196,7 +197,7 @@ pipeline:
image: karalabe/xgo-latest:latest
pull: true
environment:
TAGS: bindata sqlite
TAGS: bindata sqlite sqlite_unlock_notify
commands:
- export PATH=$PATH:$GOPATH/bin
- make release
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
FROM golang:1.10-alpine3.7 AS build-env

ARG GITEA_VERSION
ARG TAGS="sqlite"
ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata $TAGS"

#Build deps
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ fmt-check:

.PHONY: test
test:
$(GO) test -tags=sqlite $(PACKAGES)
$(GO) test -tags='sqlite sqlite_unlock_notify' $(PACKAGES)

.PHONY: coverage
coverage:
Expand All @@ -170,7 +170,7 @@ coverage:

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

.PHONY: vendor
vendor:
Expand Down Expand Up @@ -234,7 +234,7 @@ integrations.test: $(SOURCES)
$(GO) test -c code.gitea.io/gitea/integrations -o integrations.test

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

integrations.cover.test: $(SOURCES)
$(GO) test -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(PACKAGES) | tr ' ' ',') -o integrations.cover.test
Expand Down
2 changes: 1 addition & 1 deletion contrib/ide/vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"type": "go",
"request": "launch",
"mode": "debug",
"buildFlags": "-tags=\"sqlite\"",
"buildFlags": "-tags=\"sqlite sqlite_unlock_notify\"",
"port": 2345,
"host": "127.0.0.1",
"program": "${workspaceRoot}/main.go",
Expand Down
2 changes: 1 addition & 1 deletion contrib/ide/vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"focus": false,
"panel": "shared"
},
"args": ["build", "-tags=\"sqlite\""],
"args": ["build", "-tags=\"sqlite sqlite_unlock_notify\""],
"linux": {
"args": ["-o", "gitea", "${workspaceRoot}/main.go"]
},
Expand Down
2 changes: 1 addition & 1 deletion docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
.PHONY: docker
docker:
docker build --disable-content-trust=false -t $(DOCKER_REF) .
# support also build args docker build --build-arg GITEA_VERSION=v1.2.3 --build-arg TAGS="bindata sqlite" .
# support also build args docker build --build-arg GITEA_VERSION=v1.2.3 --build-arg TAGS="bindata sqlite sqlite_unlock_notify" .

.PHONY: docker-build
docker-build:
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ parts:
export GOPATH=$SNAPCRAFT_PART_INSTALL/../go
go get -u github.com/jteeuwen/go-bindata/...
cd $GOPATH/src/code.gitea.io/gitea
TAGS="bindata sqlite pam cert" make generate build
TAGS="bindata sqlite sqlite_unlock_notify pam cert" make generate build
install: |
# Set Convenience Variables
src=$SNAPCRAFT_PART_INSTALL/../go/src/code.gitea.io/gitea
Expand Down

0 comments on commit 25c49cf

Please sign in to comment.