54 lines
1.0 KiB
Makefile
54 lines
1.0 KiB
Makefile
.PHONY: fmt test test-race coverage vet build security release mq-integration-local mq-only-acceptance-local proto-lint proto-generate proto-check contract-check acceptance-local check
|
|
|
|
GO ?= go
|
|
BINARY ?= dist/sip-go-agent
|
|
|
|
fmt:
|
|
find contracts internal cmd -name '*.go' -print0 | xargs -0 gofmt -w
|
|
|
|
test:
|
|
$(GO) test ./...
|
|
|
|
test-race:
|
|
$(GO) test -race ./...
|
|
|
|
coverage:
|
|
./scripts/coverage.sh
|
|
|
|
vet:
|
|
$(GO) vet ./...
|
|
|
|
security:
|
|
@command -v govulncheck >/dev/null || { echo "govulncheck is required for the security target" >&2; exit 1; }
|
|
govulncheck ./...
|
|
|
|
build:
|
|
mkdir -p $(dir $(BINARY))
|
|
$(GO) build -trimpath -buildvcs=false -o $(BINARY) ./cmd/sip-go-agent
|
|
|
|
release:
|
|
./scripts/build-release.sh $(RELEASE_DIR)
|
|
|
|
mq-integration-local:
|
|
./scripts/mq-integration-local.sh
|
|
|
|
mq-only-acceptance-local:
|
|
./scripts/mq-only-acceptance-local.sh
|
|
|
|
proto-lint:
|
|
buf lint
|
|
|
|
proto-generate:
|
|
buf generate
|
|
|
|
proto-check:
|
|
./scripts/check-proto.sh
|
|
|
|
contract-check:
|
|
./scripts/check-contracts.sh
|
|
|
|
acceptance-local:
|
|
./scripts/acceptance-local.sh
|
|
|
|
check: fmt proto-check acceptance-local
|