Update build tags for sqlite_unlock_notify (#5144)

tokarchuk/v1.17
Mura Li 6 years ago committed by Lunny Xiao
parent 2ce72d4e00
commit 25c49cf930
  1. 31
      .drone.yml
  2. 2
      Dockerfile
  3. 6
      Makefile
  4. 2
      contrib/ide/vscode/launch.json
  5. 2
      contrib/ide/vscode/tasks.json
  6. 2
      docker/Makefile
  7. 2
      snap/snapcraft.yaml

@ -67,7 +67,7 @@ pipeline:
image: golang:1.11 image: golang:1.11
pull: true pull: true
environment: environment:
TAGS: bindata sqlite TAGS: bindata sqlite sqlite_unlock_notify
commands: commands:
- make clean - make clean
- make generate - make generate
@ -87,7 +87,7 @@ pipeline:
pull: true pull: true
group: test group: test
environment: environment:
TAGS: bindata sqlite TAGS: bindata sqlite sqlite_unlock_notify
commands: commands:
- make unit-test-coverage - make unit-test-coverage
when: when:
@ -99,7 +99,7 @@ pipeline:
pull: true pull: true
group: test group: test
environment: environment:
TAGS: bindata sqlite TAGS: bindata sqlite sqlite_unlock_notify
commands: commands:
- make test - make test
when: when:
@ -117,17 +117,18 @@ pipeline:
when: when:
event: [ tag ] event: [ tag ]
# Commented until db locking have been resolved! test-sqlite:
# test-sqlite: image: golang:1.11
# image: golang:1.10 pull: true
# pull: true group: test
# group: test environment:
# environment: TAGS: bindata
# TAGS: bindata commands:
# commands: - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
# - make test-sqlite - apt-get install -y git-lfs
# when: - make test-sqlite
# event: [ push, tag, pull_request ] when:
event: [ push, tag, pull_request ]
test-mysql: test-mysql:
image: golang:1.11 image: golang:1.11
@ -196,7 +197,7 @@ pipeline:
image: karalabe/xgo-latest:latest image: karalabe/xgo-latest:latest
pull: true pull: true
environment: environment:
TAGS: bindata sqlite TAGS: bindata sqlite sqlite_unlock_notify
commands: commands:
- export PATH=$PATH:$GOPATH/bin - export PATH=$PATH:$GOPATH/bin
- make release - make release

@ -4,7 +4,7 @@
FROM golang:1.10-alpine3.7 AS build-env FROM golang:1.10-alpine3.7 AS build-env
ARG GITEA_VERSION ARG GITEA_VERSION
ARG TAGS="sqlite" ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata $TAGS" ENV TAGS "bindata $TAGS"
#Build deps #Build deps

@ -159,7 +159,7 @@ fmt-check:
.PHONY: test .PHONY: test
test: test:
$(GO) test -tags=sqlite $(PACKAGES) $(GO) test -tags='sqlite sqlite_unlock_notify' $(PACKAGES)
.PHONY: coverage .PHONY: coverage
coverage: coverage:
@ -170,7 +170,7 @@ coverage:
.PHONY: unit-test-coverage .PHONY: unit-test-coverage
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 .PHONY: vendor
vendor: vendor:
@ -234,7 +234,7 @@ integrations.test: $(SOURCES)
$(GO) test -c code.gitea.io/gitea/integrations -o integrations.test $(GO) test -c code.gitea.io/gitea/integrations -o integrations.test
integrations.sqlite.test: $(SOURCES) 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) integrations.cover.test: $(SOURCES)
$(GO) test -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(PACKAGES) | tr ' ' ',') -o integrations.cover.test $(GO) test -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(PACKAGES) | tr ' ' ',') -o integrations.cover.test

@ -19,7 +19,7 @@
"type": "go", "type": "go",
"request": "launch", "request": "launch",
"mode": "debug", "mode": "debug",
"buildFlags": "-tags=\"sqlite\"", "buildFlags": "-tags=\"sqlite sqlite_unlock_notify\"",
"port": 2345, "port": 2345,
"host": "127.0.0.1", "host": "127.0.0.1",
"program": "${workspaceRoot}/main.go", "program": "${workspaceRoot}/main.go",

@ -35,7 +35,7 @@
"focus": false, "focus": false,
"panel": "shared" "panel": "shared"
}, },
"args": ["build", "-tags=\"sqlite\""], "args": ["build", "-tags=\"sqlite sqlite_unlock_notify\""],
"linux": { "linux": {
"args": ["-o", "gitea", "${workspaceRoot}/main.go"] "args": ["-o", "gitea", "${workspaceRoot}/main.go"]
}, },

2
docker/Makefile vendored

@ -8,7 +8,7 @@ DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
.PHONY: docker .PHONY: docker
docker: docker:
docker build --disable-content-trust=false -t $(DOCKER_REF) . 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 .PHONY: docker-build
docker-build: docker-build:

@ -67,7 +67,7 @@ parts:
export GOPATH=$SNAPCRAFT_PART_INSTALL/../go export GOPATH=$SNAPCRAFT_PART_INSTALL/../go
go get -u github.com/jteeuwen/go-bindata/... go get -u github.com/jteeuwen/go-bindata/...
cd $GOPATH/src/code.gitea.io/gitea 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: | install: |
# Set Convenience Variables # Set Convenience Variables
src=$SNAPCRAFT_PART_INSTALL/../go/src/code.gitea.io/gitea src=$SNAPCRAFT_PART_INSTALL/../go/src/code.gitea.io/gitea

Loading…
Cancel
Save