From 4d0f06c2f519c619c1778a23923750733756b069 Mon Sep 17 00:00:00 2001 From: Carlos Diaz-Padron Date: Tue, 6 May 2014 01:34:24 -0400 Subject: [PATCH 1/3] Use proper shell expansion in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 22a4369a6f..60a2c19a90 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...) +DEPS = $(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...) all: deps @mkdir -p bin/ From 9ed70ca851329dc86cd312450c26892295b9221b Mon Sep 17 00:00:00 2001 From: Carlos Diaz-Padron Date: Tue, 6 May 2014 01:38:21 -0400 Subject: [PATCH 2/3] Add make format task --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 60a2c19a90..9b7489e7ce 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ DEPS = $(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...) +PACKAGES = $(shell go list ./...) all: deps @mkdir -p bin/ @@ -18,6 +19,9 @@ test: deps integ: go list ./... | INTEG_TESTS=yes xargs -n1 go test +format: + go fmt $(PACKAGES) + web: ./scripts/website_run.sh From 715b29bef2e4bdde3c1a4d61e6c67f14804d205b Mon Sep 17 00:00:00 2001 From: Carlos Diaz-Padron Date: Tue, 6 May 2014 01:45:54 -0400 Subject: [PATCH 3/3] Add format task to all and silence large output --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9b7489e7ce..41c4cefa24 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ DEPS = $(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...) PACKAGES = $(shell go list ./...) -all: deps +all: deps format @mkdir -p bin/ @bash --norc -i ./scripts/build.sh @@ -10,8 +10,9 @@ cov: open /tmp/coverage.html deps: - go get -d -v ./... - echo $(DEPS) | xargs -n1 go get -d + @echo "--> Installing build dependencies" + @go get -d -v ./... + @echo $(DEPS) | xargs -n1 go get -d test: deps go list ./... | xargs -n1 go test @@ -20,7 +21,8 @@ integ: go list ./... | INTEG_TESTS=yes xargs -n1 go test format: - go fmt $(PACKAGES) + @echo "--> Running go fmt" + @go fmt $(PACKAGES) web: ./scripts/website_run.sh