From cc9216c1dd98b77232348bcf47b3c90ef8d10e58 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Mon, 27 Nov 2017 14:45:08 -0500 Subject: [PATCH] Remove go install from Makefile Signed-off-by: Daniel Nephin --- .appveyor.yml | 4 +++- .travis.yml | 2 +- Makefile | 9 +-------- script/setup/install-dev-tools | 10 ++++++++++ 4 files changed, 15 insertions(+), 10 deletions(-) create mode 100755 script/setup/install-dev-tools diff --git a/.appveyor.yml b/.appveyor.yml index f96dd423c..2214f3769 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -23,7 +23,9 @@ before_build: - choco install codecov build_script: - - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/bin:$PATH ; mingw32-make.exe setup check" + - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/bin:$PATH; + script/setup/install-dev-tools; + mingw32-make.exe check" - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH ; mingw32-make.exe build binaries" test_script: diff --git a/.travis.yml b/.travis.yml index 2861ff9f2..b4c833f4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,7 +52,7 @@ script: - export GOOS=$TRAVIS_GOOS - export CGO_ENABLED=$TRAVIS_CGO_ENABLED - GIT_CHECK_EXCLUDE="./vendor" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" make dco - - GOOS=linux make setup + - GOOS=linux script/setup/install-dev-tools - go build -i . - make check - if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi diff --git a/Makefile b/Makefile index ccf703b11..9d8cf8a18 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ include Makefile.$(target_os) TESTFLAGS ?= -v $(TESTFLAGS_RACE) TESTFLAGS_PARALLEL ?= 8 -.PHONY: clean all AUTHORS fmt vet lint dco build binaries test integration setup generate protos checkprotos coverage ci check help install uninstall vendor release +.PHONY: clean all AUTHORS fmt vet lint dco build binaries test integration generate protos checkprotos coverage ci check help install uninstall vendor release .DEFAULT: default all: binaries @@ -70,13 +70,6 @@ ci: check binaries checkprotos coverage coverage-integration ## to be used by th AUTHORS: .mailmap .git/HEAD git log --format='%aN <%aE>' | sort -fu > $@ -setup: ## install dependencies - @echo "$(WHALE) $@" - # TODO(stevvooe): Install these from the vendor directory - @go get -u github.com/alecthomas/gometalinter - @gometalinter --install > /dev/null - @go get -u github.com/stevvooe/protobuild - generate: protos @echo "$(WHALE) $@" @PATH=${ROOTDIR}/bin:${PATH} go generate -x ${PACKAGES} diff --git a/script/setup/install-dev-tools b/script/setup/install-dev-tools new file mode 100755 index 000000000..8875298cd --- /dev/null +++ b/script/setup/install-dev-tools @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# +# Install developer tools to $GOBIN (or $GOPATH/bin if unset) +# +set -eu -o pipefail + +go get -u github.com/stevvooe/protobuild +go get -u github.com/alecthomas/gometalinter +gometalinter --install >/dev/null +go get -u github.com/LK4D4/vndr