Debian Codegraph @

Makefile

raw
1 .ONESHELL:
2 .DEFAULT: help
3
4 .PHONY: help
5 help:
6 @grep -E '^[a-z-]+:.*#' Makefile | \
7 sort | \
8 while read -r l; do printf "\033[1;32m$$(echo $$l | \
9 cut -d':' -f1)\033[00m:$$(echo $$l | cut -d'#' -f2-)\n"; \
10 done
11
12 .PHONY: test
13 test: # Run unit test suite
14 go test -race -coverprofile=c.out ./...
15 go tool cover -html=c.out -o=coverage.html
16
17 .PHONY: lint
18 lint: # Run linters
19 go mod tidy
20 golangci-lint run --fix ./...
21
22 .PHONY: format
23 format: lint # alias for lint
24
25 .PHONY: gen
26 gen: # Generate config and CLI docs
27 go run main.go gen
28
29 .PHONY: vhs-gen
30 vhs-gen: # Generate VHS recording videos
31 cd examples
32 ls *.tape | xargs -n 1 vhs
33
34 .PHONY: docs-serve
35 docs-serve: # Serve documentation locally with hot reloading
36 mkdocs serve
37
38 .PHONY: pip-install
39 pip-install: # Install python packages using pip
40 pip install -r requirements.txt
41
42 .PHONY: pip-freeze
43 pip-freeze: # Save python dependencies to requirements.txt
44 pip freeze > requirements.txt