-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (40 loc) · 1.08 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
version := 0.3.4
# build tools
.PHONY: all
all: check build
.PHONY: check
check: vet lint staticcheck test
.PHONY: build
build:
go build .
.PHONY: test
test:
go test ./... -race -coverprofile=coverage.out -covermode=atomic
.PHONY: lint
lint:
go vet ./...
go run honnef.co/go/tools/cmd/staticcheck ./...
go run github.com/mgechev/revive -set_exit_status ./...
go run golang.org/x/vuln/cmd/govulncheck ./...
go run mvdan.cc/gofumpt -d -e .
go run github.com/princjef/gomarkdoc/cmd/gomarkdoc --check --output "{{.Dir}}/README.md" ./internal/...
fmt:
go run mvdan.cc/gofumpt -w .
docs:
go run github.com/princjef/gomarkdoc/cmd/gomarkdoc --output "{{.Dir}}/README.md" ./internal/...
.PHONY: stylua
stylua:
stylua --check .
.PHONY: clean
clean:
go clean
# Dotfiles usage
.PHONY: download
download: dotfiles-$(version)
dotfiles-$(version):
rm -f dotfiles-*
curl -L https://github.com/jan-xyz/Dotfiles/releases/download/v$(version)/dotfiles-Darwin-arm64.gz | gzip -N -d > dotfiles-$(version)
chmod +x ./dotfiles-$(version)
.PHONY: run
run: download
./dotfiles-$(version) install