-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
46 lines (35 loc) · 845 Bytes
/
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
current_dir = $(shell pwd)
.PHONY: lint
lint:
golangci-lint run ./...
.PHONY: build
build:
go build -o "$$(go env GOPATH)/bin/gomodguard" cmd/gomodguard/main.go
.PHONY: run
run: build
./gomodguard
.PHONY: test
test:
go test -v -coverprofile coverage.out
.PHONY: cover
cover:
gocover-cobertura < coverage.out > coverage.xml
.PHONY: dockerrun
dockerrun: dockerbuild
docker run -v "${current_dir}/.gomodguard.yaml:/.gomodguard.yaml" ryancurrah/gomodguard:latest
.PHONY: snapshot
snapshot:
goreleaser --clean --snapshot
.PHONY: release
release:
goreleaser --clean
.PHONY: clean
clean:
rm -rf dist/
rm -f gomodguard coverage.xml coverage.out
.PHONY: install-mac-tools
install-tools-mac:
brew install goreleaser/tap/goreleaser
.PHONY: install-go-tools
install-go-tools:
go install -v github.com/t-yuki/gocover-cobertura@latest