From 70354ccd6c8ab6e85d539d60b63711ecbb899061 Mon Sep 17 00:00:00 2001 From: Bogdan Ungureanu Date: Tue, 12 Nov 2019 11:13:58 +0200 Subject: [PATCH] ensure gopath --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f575be996..666328359 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ clean: rm -f $(BINARY_NAME) .PHONY: deps -deps: +deps: ensure-gopath $(GOGET) github.com/swaggo/cli $(GOGET) github.com/ghodss/yaml $(GOGET) github.com/KyleBanks/depth @@ -67,12 +67,15 @@ deps: $(GOGET) github.com/alecthomas/template .PHONY: devel-deps -devel-deps: +devel-deps: ensure-gopath + GO111MODULE=off $(GOGET) -v -u \ + golang.org/x/lint/golint + +.PHONY: ensure-gopath +ensure-gopath: mkdir -p ${GOPATH}/github.com/swaggo if [ -L ${GOPATH}/github.com/swaggo/swag ]; then rm ${GOPATH}/github.com/swaggo/swag; fi ln -s "$(shell pwd)" ${GOPATH}/github.com/swaggo/swag - GO111MODULE=off $(GOGET) -v -u \ - golang.org/x/lint/golint .PHONY: lint lint: devel-deps