File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Makefile
2
+ .DEFAULT_GOAL := help
3
+
4
+ # Colors
5
+ RED := $(shell tput -Txterm setaf 1)
6
+ GREEN := $(shell tput -Txterm setaf 2)
7
+ BLUE := $(shell tput -Txterm setaf 4)
8
+ CYAN := $(shell tput -Txterm setaf 6)
9
+ RESET := $(shell tput -Txterm sgr0)
10
+
11
+ # # Commands
12
+
13
+ test : # # Run the pkg tests
14
+ @go test -v ./pkg/...
15
+
16
+ # # Help
17
+
18
+ # https://gist.github.com/thomaspoignant/5b72d579bd5f311904d973652180c705
19
+ help : # # Show this help
20
+ @echo
21
+ @echo ' Usage:'
22
+ @echo ' ${CYAN}make${RESET} ${GREEN}<target>${RESET}'
23
+ @echo
24
+ @echo ' Targets:'
25
+ @awk ' BEGIN {FS = ":.*?## "} { \
26
+ if (/[a-zA-Z_\- ]+:.*? # #.*$$/) {printf " ${CYAN}%-25s${GREEN}%s${RESET}\n", $$1, $$2} \
27
+ else if (/^# # .*$$/) {printf " ${BLUE}%s${RESET}\n", substr($$1,4)} \
28
+ }' $(MAKEFILE_LIST)
29
+ @echo
You can’t perform that action at this time.
0 commit comments