diff --git a/Makefile b/Makefile index 9c5127ef7..3b07f64ec 100644 --- a/Makefile +++ b/Makefile @@ -56,42 +56,55 @@ endif all: install checks: - @echo "Checking deps:" + @echo -n "Check deps: " @(env bash $(PWD)/buildscripts/checkdeps.sh) + @echo "Done." + @echo -n "Checking project is in GOPATH: " @(env bash $(PWD)/buildscripts/checkgopath.sh) + @echo "Done." getdeps: checks - @echo "Installing golint:" && go get -u github.com/golang/lint/golint - @echo "Installing gocyclo:" && go get -u github.com/fzipp/gocyclo - @echo "Installing deadcode:" && go get -u github.com/remyoudompheng/go-misc/deadcode - @echo "Installing misspell:" && go get -u github.com/client9/misspell/cmd/misspell - @echo "Installing ineffassign:" && go get -u github.com/gordonklaus/ineffassign + @echo -n "Installing golint: " && go get -u github.com/golang/lint/golint + @echo "Done." + @echo -n "Installing gocyclo: " && go get -u github.com/fzipp/gocyclo + @echo "Done." + @echo -n "Installing deadcode: " && go get -u github.com/remyoudompheng/go-misc/deadcode + @echo "Done." + @echo -n "Installing misspell: " && go get -u github.com/client9/misspell/cmd/misspell + @echo "Done." + @echo -n "Installing ineffassign: " && go get -u github.com/gordonklaus/ineffassign + @echo "Done." verifiers: vet fmt lint cyclo spelling vet: - @echo "Running $@:" + @echo -n "Running $@: " @go vet github.com/minio/minio/cmd/... @go vet github.com/minio/minio/pkg/... + @echo "Done." fmt: - @echo "Running $@:" + @echo -n "Running $@: " @gofmt -s -l cmd @gofmt -s -l pkg + @echo "Done." lint: - @echo "Running $@:" + @echo -n "Running $@: " @${GOPATH}/bin/golint -set_exit_status github.com/minio/minio/cmd... @${GOPATH}/bin/golint -set_exit_status github.com/minio/minio/pkg... + @echo "Done." ineffassign: - @echo "Running $@:" + @echo -n "Running $@: " @${GOPATH}/bin/ineffassign . + @echo "Done." cyclo: - @echo "Running $@:" + @echo -n "Running $@: " @${GOPATH}/bin/gocyclo -over 100 cmd @${GOPATH}/bin/gocyclo -over 100 pkg + @echo "Done." build: getdeps verifiers $(UI_ASSETS) @@ -104,18 +117,21 @@ spelling: @${GOPATH}/bin/misspell -error `find docs/` test: build - @echo "Running all minio testing:" + @echo -n "Running all minio testing: " @go test $(GOFLAGS) . @go test $(GOFLAGS) github.com/minio/minio/cmd... @go test $(GOFLAGS) github.com/minio/minio/pkg... + @echo "Done." coverage: build - @echo "Running all coverage for minio:" + @echo -n "Running all coverage for minio: " @./buildscripts/go-coverage.sh + @echo "Done." gomake-all: build - @echo "Installing minio:" + @echo -n "Installing minio at $(GOPATH)/bin/minio: " @go build --ldflags $(BUILD_LDFLAGS) -o $(GOPATH)/bin/minio + @echo "Done." pkg-add: ${GOPATH}/bin/govendor add $(PKG) @@ -138,7 +154,8 @@ experimental: verifiers @MINIO_RELEASE=EXPERIMENTAL ./buildscripts/build.sh clean: - @echo "Cleaning up all the generated files:" + @echo -n "Cleaning up all the generated files: " @find . -name '*.test' | xargs rm -fv @rm -rf build @rm -rf release + @echo "Done." diff --git a/buildscripts/checkgopath.sh b/buildscripts/checkgopath.sh index 3328310b3..751d69005 100644 --- a/buildscripts/checkgopath.sh +++ b/buildscripts/checkgopath.sh @@ -16,8 +16,6 @@ # main() { - echo "Checking project is in GOPATH:" - IFS=':' read -r -a paths <<< "$GOPATH" for path in "${paths[@]}"; do minio_path="$path/src/github.com/minio/minio"