-
Notifications
You must be signed in to change notification settings - Fork 696
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (32 loc) · 1.17 KB
/
Copy pathMakefile
File metadata and controls
39 lines (32 loc) · 1.17 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
.PHONY: templ lint perf-check perf-baseline deadcode-check deadcode-baseline
GOLANGCI_LINT_VERSION := 2.13.2
templ:
go run github.com/a-h/templ/cmd/templ generate ./internal/cloud/dashboard/...
lint:
@command -v golangci-lint >/dev/null 2>&1 || { \
echo "golangci-lint v$(GOLANGCI_LINT_VERSION) is required on PATH."; \
exit 1; \
}; \
version="$$(golangci-lint version --short 2>/dev/null)" || { \
echo "golangci-lint v$(GOLANGCI_LINT_VERSION) is required, but the executable on PATH does not support 'version --short'."; \
exit 1; \
}; \
if [ "$$version" != "$(GOLANGCI_LINT_VERSION)" ]; then \
echo "golangci-lint v$(GOLANGCI_LINT_VERSION) is required; found '$$version'."; \
exit 1; \
fi; \
golangci-lint run --new-from-rev=HEAD~
perf-check:
@if [ -n "$(PERF_RATCHET_AGAINST)" ]; then \
bash scripts/perf-ratchet.sh --against "$(PERF_RATCHET_AGAINST)"; \
elif [ "$(PERF_RATCHET_BOOTSTRAP)" = "1" ]; then \
bash scripts/perf-ratchet.sh --bootstrap; \
else \
bash scripts/perf-ratchet.sh; \
fi
perf-baseline:
bash scripts/perf-ratchet.sh --update
deadcode-check:
bash scripts/deadcode-ratchet.sh
deadcode-baseline:
bash scripts/deadcode-ratchet.sh --update