mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
32 lines
823 B
Makefile
32 lines
823 B
Makefile
PROTOS_IMAGE=us-docker.pkg.dev/thog-artifacts/public/go-ci-1.17-1
|
|
|
|
.PHONY: check
|
|
.PHONY: test
|
|
.PHONY: test-race
|
|
.PHONY: run
|
|
.PHONY: install
|
|
.PHONY: protos
|
|
.PHONY: protos-windows
|
|
.PHONY: vendor
|
|
|
|
install:
|
|
CGO_ENABLED=0 go install .
|
|
|
|
check:
|
|
go fmt $(shell go list ./... | grep -v /vendor/)
|
|
go vet $(shell go list ./... | grep -v /vendor/)
|
|
|
|
test:
|
|
CGO_ENABLED=0 go test $(shell go list ./... | grep -v /vendor/)
|
|
|
|
test-race:
|
|
CGO_ENABLED=1 go test -race $(shell go list ./... | grep -v /vendor/)
|
|
|
|
bench:
|
|
CGO_ENABLED=0 go test $(shell go list ./pkg/secrets/... | grep -v /vendor/) -benchmem -run=xxx -bench .
|
|
|
|
run:
|
|
CGO_ENABLED=0 go run . git file://.
|
|
|
|
protos:
|
|
docker run -u "$(shell id -u)" -v "$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))":/pwd "${PROTOS_IMAGE}" bash -c "cd /pwd; /pwd/scripts/gen_proto.sh"
|