From c9e10c9de72bf9d8a45cf24d56c08e6128e3098c Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Wed, 26 Sep 2018 18:26:24 +0300 Subject: [PATCH] Makefile -- avoid stale copy of this repo inside build/gopath --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 71a87108..454365a9 100644 --- a/Makefile +++ b/Makefile @@ -19,9 +19,9 @@ $(STATIC): client/node_modules npm --prefix client run build-prod AdguardDNS: $(STATIC) *.go - mkdir -p $(GOPATH) + mkdir -p $(GOPATH)/src/github.com/AdguardTeam + if [[ ! -h $(GOPATH)/src/github.com/AdguardTeam/AdguardDNS ]]; then rm -rf $(GOPATH)/src/github.com/AdguardTeam/AdguardDNS && ln -fs ../../../../.. $(GOPATH)/src/github.com/AdguardTeam/AdguardDNS; fi GOPATH=$(GOPATH) go get -v -d . - GOPATH=$(GOPATH) go get -v -d -u github.com/AdguardTeam/AdguardDNS GOPATH=$(GOPATH) GOOS=$(NATIVE_GOOS) GOARCH=$(NATIVE_GOARCH) go get -v github.com/gobuffalo/packr/... mkdir -p $(GOPATH)/src/github.com/AdguardTeam/AdguardDNS/build/static ## work around packr bug GOPATH=$(GOPATH) PATH=$(GOPATH)/bin:$(PATH) packr build -ldflags="-X main.VersionString=$(GIT_VERSION)" -o AdguardDNS