From 3e2eb782d59bb5abc58528b529df506ffc467bbb Mon Sep 17 00:00:00 2001 From: thinkerou Date: Tue, 18 Sep 2018 09:20:11 +0800 Subject: [PATCH] update vgo test --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 47a4475d..a98fc0a1 100644 --- a/Makefile +++ b/Makefile @@ -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,11 +34,10 @@ vet: go vet $(VETPACKAGES) deps: - @hash go help mod > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - go mod download; \ - fi - @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; \