File: Makefile

package info (click to toggle)
changie 1.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,068 kB
  • sloc: makefile: 40; ruby: 38; javascript: 32
file content (44 lines) | stat: -rw-r--r-- 945 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.ONESHELL:
.DEFAULT: help

.PHONY: help
help:
	@grep -E '^[a-z-]+:.*#' Makefile | \
		sort | \
		while read -r l; do printf "\033[1;32m$$(echo $$l | \
		cut -d':' -f1)\033[00m:$$(echo $$l | cut -d'#' -f2-)\n"; \
	done

.PHONY: test
test: # Run unit test suite
	go test -race -coverprofile=c.out ./...
	go tool cover -html=c.out -o=coverage.html

.PHONY: lint
lint: # Run linters
	go mod tidy
	golangci-lint run --fix ./...

.PHONY: format
format: lint # alias for lint

.PHONY: gen
gen: # Generate config and CLI docs
	go run main.go gen

.PHONY: vhs-gen
vhs-gen: # Generate VHS recording videos
	cd examples
	ls *.tape | xargs -n 1 vhs

.PHONY: docs-serve
docs-serve: # Serve documentation locally with hot reloading
	mkdocs serve

.PHONY: pip-install
pip-install: # Install python packages using pip
	pip install -r requirements.txt

.PHONY: pip-freeze
pip-freeze: # Save python dependencies to requirements.txt
	pip freeze > requirements.txt