-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (45 loc) · 1.03 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
.PHONY: tidy
tidy:
go fmt ./...
go mod tidy -v
.PHONY: audit
audit:
go mod verify
go vet ./...
go run honnef.co/go/tools/cmd/staticcheck@latest -checks=all,-ST1000,-U1000 ./...
go run golang.org/x/vuln/cmd/govulncheck@latest ./...
.PHONY: build
build:
CGO_ENABLED=1 go build -o tmp/bin/brownie main.go
.PHONY: test
test:
go run gotest.tools/gotestsum@latest ./...
.PHONY: coverage
coverage:
go test -v -race -buildvcs -covermode atomic -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
.PHONY: coveralls
coveralls:
go run github.com/mattn/goveralls@latest -coverprofile=coverage.out -service=github
.PHONY: run
run:
CGO_ENABLED=1 go run ./...
.PHONY: watch
watch:
CGO_ENABLED=1 go run github.com/cosmtrek/air@v1.43.0 \
--build.cmd "make build" \
--build.bin "tmp/bin/brownie" \
--build.delay "100" \
--build.exclude_dir "" \
--build.include_ext "go" \
--misc.clean_on_exit "true"
.PHONY: clean
clean:
rm -rf tmp
go clean
.PHONY: install
install:
go mod download
.PHONY: vhs
vhs:
vhs demo.tape