[tools]
rust = "1.85"
[tasks.verify]
description = "Run all checks (fmt, check, lint, test, build)"
depends = ["fmt", "check", "lint", "test", "build"]
[tasks.check]
description = "Run cargo check"
run = "cargo check --all-targets --all-features --quiet"
[tasks.fmt]
description = "Check code formatting"
run = "cargo fmt --all --check --quiet"
[tasks."fmt:fix"]
description = "Fix code formatting"
run = "cargo fmt --all"
[tasks.lint]
description = "Run clippy lints"
run = "cargo clippy --all-targets --all-features --quiet -- -D warnings"
[tasks."lint:fix"]
description = "Fix clippy lints where possible"
run = "cargo clippy --all-targets --all-features --fix --allow-dirty --allow-staged --quiet -- -D warnings"
[tasks.test]
description = "Run tests"
run = "cargo test --quiet"
[tasks.build]
description = "Build debug binary"
run = "cargo build --quiet"
[tasks."build:release"]
description = "Build release binary"
run = "cargo build --release --quiet"
[tasks."install"]
description = "Build and install gw locally (for dogfooding)"
run = "cargo install --path . --quiet"
depends = ["build:release"]
[tasks."cleanup"]
description = "Cleanup merged branch and reinstall gw (main worktree only)"
run = """
gw cleanup
if [ "$(git rev-parse --git-dir)" = "$(git rev-parse --git-common-dir)" ]; then
echo "Main worktree detected, reinstalling gw..."
cargo install --path . --quiet
else
echo "Worktree detected, skipping install (run from main worktree)"
fi
"""
depends = ["build:release"]