Merge 1ca4aef15d7c17889b658822f5149f17760cf376 into 07f1bf0e63512fbf9c7d7984d235a399eb916244

This commit is contained in:
田欧 2018-09-19 05:58:47 +00:00 committed by GitHub
commit 1c159669cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -7,10 +7,14 @@ go:
- 1.9.x
- 1.10.x
- 1.11.x
env: GO111MODULE=on
git:
depth: 10
before_install:
- if [[ "$GO111MODULE" = "on" ]]; then mkdir "$HOME/go"; export GOPATH="$HOME/go"; fi
install:
- make install

View File

@ -6,7 +6,11 @@ GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*")
all: install
install: deps
govendor sync
@hash go help mod > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go mod download; \
else \
govendor sync; \
fi
.PHONY: test
test:
@ -30,8 +34,10 @@ vet:
go vet $(VETPACKAGES)
deps:
@hash govendor > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/kardianos/govendor; \
@hash go help mod > /dev/null 2>&1; if [ $$? -eq 0 ]; then \
@hash govendor > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/kardianos/govendor; \
fi \
fi
@hash embedmd > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/campoy/embedmd; \