-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (28 loc) · 1.03 KB
/
Copy pathMakefile
File metadata and controls
40 lines (28 loc) · 1.03 KB
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
BINARY := vramwatch
PKG := ./cmd/vramwatch
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS := -ldflags "-X main.Version=$(VERSION)"
.PHONY: build test vet fmt tidy run watch demo card clean
build: ## build the CLI
go build $(LDFLAGS) -o $(BINARY) $(PKG)
test: ## run the test suite
go test ./...
vet:
go vet ./...
fmt: ## check formatting (fails if any file needs gofmt)
@test -z "$$(gofmt -l .)" || { echo "gofmt needed:"; gofmt -l .; exit 1; }
tidy:
go mod tidy
run: build ## show the launch CLI
./$(BINARY) help
watch: build ## live TUI against the local machine
./$(BINARY) watch
demo: build ## live TUI against the synthetic growing-KV demo source
./$(BINARY) watch --source demo
card: ## regenerate the deterministic report card used in the docs
go run ./tools/reportfixture > docs/sample/vramwatch-card.svg
gif: ## regenerate docs/demo.gif (standalone module; fetches golang.org/x/image)
cd docs/gifgen && go run . ../demo.gif
clean:
rm -f $(BINARY) $(BINARY).exe
rm -rf dist