From 949b4534729bcd4512c996821ff32e6f0a5d6765 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Wed, 10 Jan 2018 12:52:02 -0800 Subject: [PATCH] Update Makefile for git get -u with version (#1372) The changes in this fix have: 1. checkout master branch of dependencies (non-branch will trigger an error with go get -u) 2. go get -u 3. checkout specific versioon (not necessary a branch). Signed-off-by: Yong Tang --- Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 57dd348af..0b01b0bc2 100644 --- a/Makefile +++ b/Makefile @@ -24,12 +24,17 @@ testk8s: check .PHONY: godeps godeps: - go get github.com/mholt/caddy - go get github.com/miekg/dns - go get github.com/prometheus/client_golang/prometheus/promhttp - go get github.com/prometheus/client_golang/prometheus - go get golang.org/x/net/context - go get golang.org/x/text + (cd $(GOPATH)/src/github.com/mholt/caddy 2>/dev/null && git checkout -q master 2>/dev/null || true) + (cd $(GOPATH)/src/github.com/miekg/dns 2>/dev/null && git checkout -q master 2>/dev/null || true) + (cd $(GOPATH)/src/github.com/prometheus/client_golang 2>/dev/null && git checkout -q master 2>/dev/null || true) + (cd $(GOPATH)/src/golang.org/x/net 2>/dev/null && git checkout -q master 2>/dev/null || true) + (cd $(GOPATH)/src/golang.org/x/text 2>/dev/null && git checkout -q master 2>/dev/null || true) + go get -u github.com/mholt/caddy + go get -u github.com/miekg/dns + go get -u github.com/prometheus/client_golang/prometheus/promhttp + go get -u github.com/prometheus/client_golang/prometheus + go get -u golang.org/x/net/context + go get -u golang.org/x/text (cd $(GOPATH)/src/github.com/mholt/caddy && git checkout -q v0.10.10) (cd $(GOPATH)/src/github.com/miekg/dns && git checkout -q v1.0.3) (cd $(GOPATH)/src/github.com/prometheus/client_golang && git checkout -q v0.8.0)