diff options
author | Mura Li <typeless@users.noreply.github.com> | 2019-03-27 19:15:23 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-03-27 19:15:23 +0800 |
commit | d77176912bccf1dc0ad93366df55f00fee23b498 (patch) | |
tree | 309fc6350f77f4061360160b88343360d45d5d24 /Makefile | |
parent | d578b71d61ee8131e8abf7f538b93d8c6cc6fe6d (diff) | |
download | gitea-d77176912bccf1dc0ad93366df55f00fee23b498.tar.gz gitea-d77176912bccf1dc0ad93366df55f00fee23b498.zip |
Use Go1.11 module (#5743)
* Migrate to go modules
* make vendor
* Update mvdan.cc/xurls
* make vendor
* Update code.gitea.io/git
* make fmt-check
* Update github.com/go-sql-driver/mysql
* make vendor
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -1,5 +1,6 @@ DIST := dist IMPORT := code.gitea.io/gitea +export GO111MODULE=off GO ?= go SED_INPLACE := sed -i @@ -169,7 +170,7 @@ fmt-check: .PHONY: test test: - $(GO) test -tags='sqlite sqlite_unlock_notify' $(PACKAGES) + GO111MODULE=on $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' $(PACKAGES) .PHONY: coverage coverage: @@ -184,10 +185,7 @@ unit-test-coverage: .PHONY: vendor vendor: - @hash dep > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - $(GO) get -u github.com/golang/dep/cmd/dep; \ - fi - dep ensure -vendor-only + GO111MODULE=on $(GO) mod tidy && GO111MODULE=on $(GO) mod vendor .PHONY: test-vendor test-vendor: vendor @@ -197,7 +195,6 @@ test-vendor: vendor echo "$${diff}"; \ exit 1; \ fi; -#TODO add dep status -missing when implemented .PHONY: test-sqlite test-sqlite: integrations.sqlite.test @@ -284,13 +281,13 @@ integration-test-coverage: integrations.cover.test generate-ini GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out integrations.test: $(SOURCES) - $(GO) test -c code.gitea.io/gitea/integrations -o integrations.test + GO111MODULE=on $(GO) test -mod=vendor -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 sqlite_unlock_notify' + GO111MODULE=on $(GO) test -mod=vendor -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 + GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(PACKAGES) | tr ' ' ',') -o integrations.cover.test .PHONY: migrations.test migrations.test: $(SOURCES) @@ -311,7 +308,7 @@ install: $(wildcard *.go) build: $(EXECUTABLE) $(EXECUTABLE): $(SOURCES) - $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ + GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ .PHONY: release release: release-dirs release-windows release-linux release-darwin release-copy release-compress release-check |