chore: Add Justfile commands for easier development (#205)

This commit is contained in:
Gerald Pinder 2024-07-24 15:15:31 -04:00 committed by GitHub
parent 1d3e4e075e
commit 431162beb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,71 @@ set positional-arguments := true
default:
@just --list
# release: Run cargo release and push the tag separately
# Install bluebuild using cargo with release optimization
install:
cargo install --path .
# Install bluebuild with all features with release optimizations
install-all-features:
cargo install --all-features --path .
# Install bluebuild using cargo with debug targets
install-debug:
cargo install --debug --path .
# Install bluebuild with all features and debug target
install-debug-all-features:
cargo install --debug --all-features --path .
# Run unit tests
test:
cargo test --workspace -- --show-output
# Run unit tests for all features
test-all-features:
cargo test --workspace --all-features -- --show-output
# Run clippy
lint:
cargo clippy -- -D warnings
# Run clippy for all features
lint-all-features:
cargo clippy --all-features -- -D warnings
# Watch the files and run cargo check on changes
watch:
cargo watch -c
# Install bluebuild whenever there is a change in the project files
watch-install:
cargo watch -c -x 'install --debug --path .'
# Install bluebuild whenever there is a change in the project files
watch-install-all-features:
cargo watch -c -x 'install --debug --all-features --path .'
# Run tests anytime a file is changed
watch-test:
cargo watch -c -x 'test --workspace -- --show-output'
# Run all feature tests anytime a file is changed
watch-test-all-features:
cargo watch -c -x 'test --workspace --all-features -- --show-output'
# Run lint anytime a file is changed
watch-lint:
cargo watch -c -x 'clippy -- -D warnings'
# Run all feature lint anytime a file is changed
watch-lint-all-features:
cargo watch -c -x 'clippy --all-features -- -D warnings'
# Installs cargo tools that help with development
tools:
cargo install cargo-watch
# Run cargo release and push the tag separately
release *args:
#!/usr/bin/env bash
set -euxo pipefail