Skip to content

Commit 7049ae4

Browse files
committed
Update Makefile
1 parent 5b5e57f commit 7049ae4

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Makefile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ GOTOOLS = \
55

66
.PHONY: setup
77
setup: ## Install all the build and lint dependencies
8-
go get -u $(GOTOOLS)
8+
@echo "--> Installing tools"
9+
@go get -u $(GOTOOLS)
910

1011
.PHONY: dep
1112
dep: ## Install all import dependencies
12-
dep ensure
13+
@echo "--> Installing dependencies"
14+
@dep ensure
1315

1416
.PHONY: test
1517
test: ## Run all the tests
18+
@echo "--> Running tests"
1619
@echo 'mode: atomic' > coverage.txt && go list ./... | grep -v /vendor/ | xargs -n1 -I{} sh -c 'go test -covermode=atomic -coverprofile=coverage.txt -v -race -timeout=30s {}'
1720

1821
.PHONY: cover
@@ -21,22 +24,26 @@ cover: test ## Run all the tests and opens the coverage report
2124

2225
.PHONY: fmt
2326
fmt: ## gofmt and goimports all go files
24-
find . -name '*.go' -not -wholename './vendor/*' | while read -r file; do gofmt -w -s "$$file"; goimports -w "$$file"; done
27+
@echo "--> Running gofmt/goimports"
28+
@find . -name '*.go' -not -wholename './vendor/*' | while read -r file; do gofmt -w -s "$$file"; goimports -w "$$file"; done
2529

2630
.PHONY: lint
2731
lint: ## Run all the linters
28-
golangci-lint run
32+
@echo "--> Running linters"
33+
@golangci-lint run
2934

3035
.PHONY: ci
3136
ci: lint test ## Run all the tests and code checks
3237

3338
.PHONY: generate
3439
generate: ## Run go generate
35-
go generate
40+
@echo "--> Running go generate"
41+
@go generate
3642

3743
.PHONY: build
3844
build: ## Build
39-
go build -o bin/optional ./cmd/optional/main.go
45+
@echo "--> Building ..."
46+
@go build -o bin/optional ./cmd/optional/main.go
4047

4148
# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
4249
.PHONY: help

0 commit comments

Comments
 (0)