crun 0.8.0

Run commands concurrently - a Rust port of concurrently
.PHONY: check fmt clippy doc test build integration-test test-linux release all

# Run all checks
all: check test

# All static checks (fast, no tests)
check: fmt clippy doc build

# Check formatting
fmt:
	cargo fmt --check

# Clippy with warnings as errors
clippy:
	cargo clippy -- -D warnings

# Check documentation builds cleanly
doc:
	RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --quiet

# Build with no warnings
build:
	RUSTFLAGS="-D warnings" cargo build

# Rust unit tests
test:
	cargo test

# Build release and run integration tests
integration-test:
	cargo build --release
	cd tests/integration && npm test

# Bump version, tag, and push (triggers release workflow)
release:
	./tools/release.sh

# Run all checks and tests in a Linux container
test-linux:
	docker build -f Dockerfile.test -t crun-test . && docker run --rm crun-test

# Format code (fix, not just check)
fix-fmt:
	cargo fmt

# Clippy with auto-fix
fix-clippy:
	cargo clippy --fix --allow-dirty -- -D warnings