-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (24 loc) · 748 Bytes
/
Makefile
File metadata and controls
29 lines (24 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Makefile
.DEFAULT_GOAL := help
# Colors
RED := $(shell tput -Txterm setaf 1)
GREEN := $(shell tput -Txterm setaf 2)
BLUE := $(shell tput -Txterm setaf 4)
CYAN := $(shell tput -Txterm setaf 6)
RESET := $(shell tput -Txterm sgr0)
## Commands
test: ## Run the pkg tests
@go test -v ./pkg/...
## Help
# https://gist.github.com/thomaspoignant/5b72d579bd5f311904d973652180c705
help: ## Show this help
@echo
@echo 'Usage:'
@echo ' ${CYAN}make${RESET} ${GREEN}<target>${RESET}'
@echo
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*?## "} { \
if (/[a-zA-Z_\-]+:.*?##.*$$/) {printf " ${CYAN}%-25s${GREEN}%s${RESET}\n", $$1, $$2} \
else if (/^## .*$$/) {printf " ${BLUE}%s${RESET}\n", substr($$1,4)} \
}' $(MAKEFILE_LIST)
@echo