]> source.dussan.org Git - gitea.git/commitdiff
Update build tags for sqlite_unlock_notify (#5144)
authorMura Li <typeless@users.noreply.github.com>
Tue, 23 Oct 2018 11:47:59 +0000 (19:47 +0800)
committerLunny Xiao <xiaolunwen@gmail.com>
Tue, 23 Oct 2018 11:47:59 +0000 (19:47 +0800)
.drone.yml
Dockerfile
Makefile
contrib/ide/vscode/launch.json
contrib/ide/vscode/tasks.json
docker/Makefile
snap/snapcraft.yaml

index e4ade4fc1c05e45ae1537b03a58e80d5111518fd..682797105eacfd01d6bf7a543fdcd0a40e67b7a9 100644 (file)
@@ -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
@@ -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:
@@ -99,7 +99,7 @@ pipeline:
     pull: true
     group: test
     environment:
-      TAGS: bindata sqlite
+      TAGS: bindata sqlite sqlite_unlock_notify
     commands:
       - make test
     when:
@@ -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
@@ -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
index 53ffdda5dd66406137d3afcaf2a670e5c99d8eb9..a5b91074ea00be7d12a832866d16c2fce183d576 100644 (file)
@@ -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
index 28f52196ef4ab6c61d0f8a5a9f7b3198d9b4eb1b..6f3779e30b568dbe147ca504febf25de17dae784 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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:
@@ -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:
@@ -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
index af1594cd5d8a46dbceb45f8788bc31ae55dce95b..6e90aa0eaa5a54eaf291c33f24d9d10f9049a18d 100644 (file)
@@ -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",
index 8527d91c8f549dd732422647b3dbbeb24e36a379..ac42806d6713fd9eb42573d3ce2b2763c4a6e4e1 100644 (file)
@@ -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"]
       },
index 7f5525186070583f6d5c6a4afedc36f06c5c2e62..80e7ae34b3a17b6b28d9f461606fc2433270ed1d 100644 (file)
@@ -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:
index 7439f50f2555658cdd90626f6215dedba81ab487..aab1c2b05c52f04086b8b4dea1e1c53bc24941ce 100644 (file)
@@ -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