.PHONY: build build-full test lint fmt fmt-check clean docker docker-images helm-lint dev ci

build:
	cargo build --release --all

build-full:
	cargo build --release -p bascule-server --features agent-id

test:
	cargo test --all

lint:
	cargo clippy --all-targets -- -D warnings

fmt:
	cargo fmt --all

fmt-check:
	cargo fmt --all --check

clean:
	cargo clean

docker:
	docker build -t bascule:latest .

docker-images:
	docker build -t bascule-shell:minimal images/minimal/
	docker build -t bascule-shell:k8s-ops images/k8s-ops/
	docker build -t bascule-shell:net-ops images/net-ops/
	docker build -t bascule-shell:dev images/dev/

helm-lint:
	helm lint charts/bascule/

dev:
	RUST_LOG=debug cargo run -p bascule-server -- --config config/bascule.example.toml

ci: fmt-check lint build test helm-lint
	@echo "All checks passed"
