File: Makefile

package info (click to toggle)
golang-github-prometheus-client-golang 1.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,192 kB
  • sloc: makefile: 68; ansic: 46; sh: 21
file content (28 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (3)
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
.PHONY: help
help: ## Displays help.
	@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)

.PHONY: init
init: ## init
	$(MAKE) stop
	go test -count 1 -v -tags=interactive -run ^TestPlayground ./internal & # count 1 is to avoid cache.

.PHONY: stop
stop: ## stop init
	@curl -s http://localhost:19920 || true

.PHONY: run
run: ## run whatsup
	@go run main.go -config-file=./whatsup.yaml -address=:99

.PHONY: metrics
metrics: ## get metrics from whatsup
	@curl -H 'Accept: application/openmetrics-text' localhost:99/metrics

.PHONY: whatsup
whatsup: ## ask what's up
	@curl localhost:99/whatsup

.PHONY: test
test: ## run acceptance tests
	go test -count 1 -v -tags=interactive -run ^TestAcceptance ./internal & # count 1 is to avoid cache.