2022-01-13 20:02:24 +00:00
|
|
|
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/)
|
|
|
|
|
2022-01-19 06:24:56 +00:00
|
|
|
test-failing:
|
|
|
|
CGO_ENABLED=0 go test -timeout=30s $(shell go list ./... | grep -v /vendor/) | grep FAIL
|
|
|
|
|
2022-01-13 20:02:24 +00:00
|
|
|
test:
|
2022-01-19 17:27:22 +00:00
|
|
|
CGO_ENABLED=0 go test -timeout=30s $(shell go list ./... | grep -v /vendor/ | grep -v /pkg/detectors)
|
2022-01-13 20:02:24 +00:00
|
|
|
|
|
|
|
test-race:
|
2022-01-19 17:27:22 +00:00
|
|
|
CGO_ENABLED=1 go test -timeout=30s -race $(shell go list ./... | grep -v /vendor/ | grep -v /pkg/detectors)
|
|
|
|
|
|
|
|
test-detectors:
|
|
|
|
CGO_ENABLED=0 go test -timeout=30s $(shell go list ./... | grep /pkg/detectors)
|
2022-01-13 20:02:24 +00:00
|
|
|
|
|
|
|
bench:
|
|
|
|
CGO_ENABLED=0 go test $(shell go list ./pkg/secrets/... | grep -v /vendor/) -benchmem -run=xxx -bench .
|
|
|
|
|
|
|
|
run:
|
2022-01-19 00:59:18 +00:00
|
|
|
CGO_ENABLED=0 go run . git file://. --json
|
|
|
|
|
|
|
|
run-debug:
|
|
|
|
CGO_ENABLED=0 go run . git file://. --json --debug
|
2022-01-13 20:02:24 +00:00
|
|
|
|
|
|
|
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"
|