|
|
@ -56,42 +56,55 @@ endif |
|
|
|
all: install |
|
|
|
all: install |
|
|
|
|
|
|
|
|
|
|
|
checks: |
|
|
|
checks: |
|
|
|
@echo "Checking deps:"
|
|
|
|
@echo -n "Check deps: "
|
|
|
|
@(env bash $(PWD)/buildscripts/checkdeps.sh)
|
|
|
|
@(env bash $(PWD)/buildscripts/checkdeps.sh)
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
@echo -n "Checking project is in GOPATH: "
|
|
|
|
@(env bash $(PWD)/buildscripts/checkgopath.sh)
|
|
|
|
@(env bash $(PWD)/buildscripts/checkgopath.sh)
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
getdeps: checks |
|
|
|
getdeps: checks |
|
|
|
@echo "Installing golint:" && go get -u github.com/golang/lint/golint
|
|
|
|
@echo -n "Installing golint: " && go get -u github.com/golang/lint/golint
|
|
|
|
@echo "Installing gocyclo:" && go get -u github.com/fzipp/gocyclo
|
|
|
|
@echo "Done."
|
|
|
|
@echo "Installing deadcode:" && go get -u github.com/remyoudompheng/go-misc/deadcode
|
|
|
|
@echo -n "Installing gocyclo: " && go get -u github.com/fzipp/gocyclo
|
|
|
|
@echo "Installing misspell:" && go get -u github.com/client9/misspell/cmd/misspell
|
|
|
|
@echo "Done."
|
|
|
|
@echo "Installing ineffassign:" && go get -u github.com/gordonklaus/ineffassign
|
|
|
|
@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 |
|
|
|
verifiers: vet fmt lint cyclo spelling |
|
|
|
|
|
|
|
|
|
|
|
vet: |
|
|
|
vet: |
|
|
|
@echo "Running $@:"
|
|
|
|
@echo -n "Running $@: "
|
|
|
|
@go vet github.com/minio/minio/cmd/...
|
|
|
|
@go vet github.com/minio/minio/cmd/...
|
|
|
|
@go vet github.com/minio/minio/pkg/...
|
|
|
|
@go vet github.com/minio/minio/pkg/...
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
fmt: |
|
|
|
fmt: |
|
|
|
@echo "Running $@:"
|
|
|
|
@echo -n "Running $@: "
|
|
|
|
@gofmt -s -l cmd
|
|
|
|
@gofmt -s -l cmd
|
|
|
|
@gofmt -s -l pkg
|
|
|
|
@gofmt -s -l pkg
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
lint: |
|
|
|
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/cmd...
|
|
|
|
@${GOPATH}/bin/golint -set_exit_status github.com/minio/minio/pkg...
|
|
|
|
@${GOPATH}/bin/golint -set_exit_status github.com/minio/minio/pkg...
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
ineffassign: |
|
|
|
ineffassign: |
|
|
|
@echo "Running $@:"
|
|
|
|
@echo -n "Running $@: "
|
|
|
|
@${GOPATH}/bin/ineffassign .
|
|
|
|
@${GOPATH}/bin/ineffassign .
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
cyclo: |
|
|
|
cyclo: |
|
|
|
@echo "Running $@:"
|
|
|
|
@echo -n "Running $@: "
|
|
|
|
@${GOPATH}/bin/gocyclo -over 100 cmd
|
|
|
|
@${GOPATH}/bin/gocyclo -over 100 cmd
|
|
|
|
@${GOPATH}/bin/gocyclo -over 100 pkg
|
|
|
|
@${GOPATH}/bin/gocyclo -over 100 pkg
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
build: getdeps verifiers $(UI_ASSETS) |
|
|
|
build: getdeps verifiers $(UI_ASSETS) |
|
|
|
|
|
|
|
|
|
|
@ -104,18 +117,21 @@ spelling: |
|
|
|
@${GOPATH}/bin/misspell -error `find docs/`
|
|
|
|
@${GOPATH}/bin/misspell -error `find docs/`
|
|
|
|
|
|
|
|
|
|
|
|
test: build |
|
|
|
test: build |
|
|
|
@echo "Running all minio testing:"
|
|
|
|
@echo -n "Running all minio testing: "
|
|
|
|
@go test $(GOFLAGS) .
|
|
|
|
@go test $(GOFLAGS) .
|
|
|
|
@go test $(GOFLAGS) github.com/minio/minio/cmd...
|
|
|
|
@go test $(GOFLAGS) github.com/minio/minio/cmd...
|
|
|
|
@go test $(GOFLAGS) github.com/minio/minio/pkg...
|
|
|
|
@go test $(GOFLAGS) github.com/minio/minio/pkg...
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
coverage: build |
|
|
|
coverage: build |
|
|
|
@echo "Running all coverage for minio:"
|
|
|
|
@echo -n "Running all coverage for minio: "
|
|
|
|
@./buildscripts/go-coverage.sh
|
|
|
|
@./buildscripts/go-coverage.sh
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
gomake-all: build |
|
|
|
gomake-all: build |
|
|
|
@echo "Installing minio:"
|
|
|
|
@echo -n "Installing minio at $(GOPATH)/bin/minio: "
|
|
|
|
@go build --ldflags $(BUILD_LDFLAGS) -o $(GOPATH)/bin/minio
|
|
|
|
@go build --ldflags $(BUILD_LDFLAGS) -o $(GOPATH)/bin/minio
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
pkg-add: |
|
|
|
pkg-add: |
|
|
|
${GOPATH}/bin/govendor add $(PKG)
|
|
|
|
${GOPATH}/bin/govendor add $(PKG)
|
|
|
@ -138,7 +154,8 @@ experimental: verifiers |
|
|
|
@MINIO_RELEASE=EXPERIMENTAL ./buildscripts/build.sh
|
|
|
|
@MINIO_RELEASE=EXPERIMENTAL ./buildscripts/build.sh
|
|
|
|
|
|
|
|
|
|
|
|
clean: |
|
|
|
clean: |
|
|
|
@echo "Cleaning up all the generated files:"
|
|
|
|
@echo -n "Cleaning up all the generated files: "
|
|
|
|
@find . -name '*.test' | xargs rm -fv
|
|
|
|
@find . -name '*.test' | xargs rm -fv
|
|
|
|
@rm -rf build
|
|
|
|
@rm -rf build
|
|
|
|
@rm -rf release
|
|
|
|
@rm -rf release
|
|
|
|
|
|
|
|
@echo "Done."
|
|
|
|