-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (32 loc) · 1.05 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
.DEFAULT_GOAL := test
PREFIX := $(HOME)/local/gitmirror
fmt:
golangci-lint run --disable-all --no-config -Egofmt --fix
golangci-lint run --disable-all --no-config -Egofumpt --fix
lint: fmt
staticcheck ./...
revive -config revive.toml -exclude internal/optionparser ./...
golangci-lint run
golangci: fmt
golangci-lint run
staticcheck: fmt
staticcheck ./...
revive: fmt
revive -config revive.toml -exclude internal/optionparser ./...
test:
go test -shuffle on github.com/telemachus/gitmirror/internal/cli
go test -shuffle on github.com/telemachus/gitmirror/internal/git
testv:
go test -shuffle on -v github.com/telemachus/gitmirror/internal/cli
go test -shuffle on -v github.com/telemachus/gitmirror/internal/git
testr:
go test -race -shuffle on github.com/telemachus/gitmirror/internal/cli
go test -race -shuffle on github.com/telemachus/gitmirror/internal/git
build: lint testr
go build ./cmd/gitmirror
install: build
go install ./cmd/gitmirror
clean:
rm -f gitmirror
go clean -i -r -cache
.PHONY: fmt lint build install test testv testr clean