File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,17 @@ GOTOOLS = \
5
5
6
6
.PHONY : setup
7
7
setup : # # Install all the build and lint dependencies
8
- go get -u $(GOTOOLS )
8
+ @echo " --> Installing tools"
9
+ @go get -u $(GOTOOLS )
9
10
10
11
.PHONY : dep
11
12
dep : # # Install all import dependencies
12
- dep ensure
13
+ @echo " --> Installing dependencies"
14
+ @dep ensure
13
15
14
16
.PHONY : test
15
17
test : # # Run all the tests
18
+ @echo " --> Running tests"
16
19
@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 {}'
17
20
18
21
.PHONY : cover
@@ -21,22 +24,26 @@ cover: test ## Run all the tests and opens the coverage report
21
24
22
25
.PHONY : fmt
23
26
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
25
29
26
30
.PHONY : lint
27
31
lint : # # Run all the linters
28
- golangci-lint run
32
+ @echo " --> Running linters"
33
+ @golangci-lint run
29
34
30
35
.PHONY : ci
31
36
ci : lint test # # Run all the tests and code checks
32
37
33
38
.PHONY : generate
34
39
generate : # # Run go generate
35
- go generate
40
+ @echo " --> Running go generate"
41
+ @go generate
36
42
37
43
.PHONY : build
38
44
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
40
47
41
48
# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
42
49
.PHONY : help
You can’t perform that action at this time.
0 commit comments