PROJECT_NAME := $(shell basename $(shell pwd))# {{{}}} GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed 's/\//_/g') IMAGE_TAG := $(PROJECT_NAME):$(GIT_BRANCH) .PHONY: build check test run clean fmt lint doc vendor .PHONY: build-image run-image health-check list-services test-image setup: mise install mise exec go -- go install github.com/xlgmokha/minit@latest mise exec rust -- rustup component add clippy rustfmt # Cargo targets build: @cargo build --offline check: @cargo check test: @cargo test run: build @cp target/debug/authzd bin/authzd @minit clean: @cargo clean fmt: @cargo fmt lint: @cargo clippy doc: @cargo doc --open vendor: @cargo vendor # Docker targets build-image: @docker build --tag $(IMAGE_TAG) . run-image: build-image @docker run --rm -p 10000:10000 -p 9901:9901 --init -it $(IMAGE_TAG) # HTTP and gRPC testing targets health-check: @curl -s http://localhost:10000/health || echo "Service not running" list-services: @grpcurl -plaintext localhost:50051 list