mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-25 01:40:30 +00:00
c28f7cb29f
Initial part of #435
42 lines
750 B
Makefile
42 lines
750 B
Makefile
current_dir = $(shell pwd)
|
|
|
|
.PHONY: lint
|
|
lint:
|
|
golangci-lint run ./...
|
|
|
|
.PHONY: build
|
|
build:
|
|
go build -o 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: release
|
|
release:
|
|
goreleaser --rm-dist
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf dist/
|
|
rm -f gomodguard coverage.xml coverage.out
|
|
|
|
.PHONY: install-tools-mac
|
|
install-tools-mac:
|
|
brew install goreleaser/tap/goreleaser
|
|
|
|
.PHONY: install-go-tools
|
|
install-go-tools:
|
|
go get github.com/t-yuki/gocover-cobertura
|