From 996e7ff3e447503e0f7cb929a65bb93a5608a8d4 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Fri, 6 Mar 2015 17:05:00 +0000 Subject: [PATCH] Add quickdev option; skips getting dependencies to make repeated builds a bit faster and less network-heavy --- Makefile | 3 +++ scripts/build.sh | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fdb9ab3d6e03..21a54a8f8fec 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,9 @@ bin: generate dev: generate @TF_DEV=1 sh -c "'$(CURDIR)/scripts/build.sh'" +quickdev: generate + @TF_QUICKDEV=1 TF_DEV=1 sh -c "'$(CURDIR)/scripts/build.sh'" + # test runs the unit tests and vets the code test: generate TF_ACC= go test $(TEST) $(TESTARGS) -timeout=30s -parallel=4 diff --git a/scripts/build.sh b/scripts/build.sh index bf607406841e..4433d8f9b6bd 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -19,9 +19,11 @@ GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true) XC_ARCH=${XC_ARCH:-"386 amd64 arm"} XC_OS=${XC_OS:-linux darwin windows freebsd openbsd} -# Install dependencies -echo "==> Getting dependencies..." -go get ./... +# Install dependencies unless running in quick mode +if [ "${TF_QUICKDEV}x" == "x" ]; then + echo "==> Getting dependencies..." + go get ./... +fi # Delete the old dir echo "==> Removing old directory..."