-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathMakefile
44 lines (35 loc) · 979 Bytes
/
Makefile
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
goimports -w -local github.com/miniscruff/changie .
golangci-lint run ./...
.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