Debian Codegraph @

tutorials/whatsup/Makefile

raw
1 .PHONY: help
2 help: ## Displays help.
3 @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-z0-9A-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
4
5 .PHONY: init
6 init: ## init
7 $(MAKE) stop
8 go test -count 1 -v -tags=interactive -run ^TestPlayground ./internal & # count 1 is to avoid cache.
9
10 .PHONY: stop
11 stop: ## stop init
12 @curl -s http://localhost:19920 || true
13
14 .PHONY: run
15 run: ## run whatsup
16 @go run main.go -config-file=./whatsup.yaml -address=:99
17
18 .PHONY: metrics
19 metrics: ## get metrics from whatsup
20 @curl -H 'Accept: application/openmetrics-text' localhost:99/metrics
21
22 .PHONY: whatsup
23 whatsup: ## ask what's up
24 @curl localhost:99/whatsup
25
26 .PHONY: test
27 test: ## run acceptance tests
28 go test -count 1 -v -tags=interactive -run ^TestAcceptance ./internal & # count 1 is to avoid cache.