huskies: merge 523_refactor_introduce_script_test_script_lint_script_build_and_migrate_agent_prompts_off_tech_specific_commands

This commit is contained in:
dave
2026-04-10 11:16:51 +00:00
parent 2a24a4cc85
commit 7e5b9839e8
5 changed files with 78 additions and 39 deletions
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
echo "=== Building Rust ==="
cargo build --manifest-path "$PROJECT_ROOT/Cargo.toml"
if [ -d "$PROJECT_ROOT/frontend" ]; then
echo "=== Building frontend ==="
cd "$PROJECT_ROOT/frontend"
npm install
npm run build
else
echo "Skipping frontend build (no frontend directory)"
fi
Executable
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
echo "=== Checking Rust formatting ==="
if cargo fmt --version &>/dev/null; then
cargo fmt --manifest-path "$PROJECT_ROOT/Cargo.toml" --check
else
echo "Skipping Rust formatting check (rustfmt not installed)"
fi
echo "=== Running cargo clippy ==="
cargo clippy --manifest-path "$PROJECT_ROOT/Cargo.toml" --all-targets --all-features -- -D warnings
if [ -d "$PROJECT_ROOT/frontend" ]; then
echo "=== Running Biome lint ==="
cd "$PROJECT_ROOT/frontend"
npx @biomejs/biome check src/
else
echo "Skipping Biome lint (no frontend directory)"
fi
Executable
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
PORT="${HUSKIES_PORT:-3001}"
echo "=== Starting dev server on port $PORT ==="
cd "$PROJECT_ROOT"
exec env HUSKIES_PORT="$PORT" cargo run
+8 -1
View File
@@ -14,8 +14,15 @@ else
echo "Skipping frontend build (no frontend directory)"
fi
echo "=== Checking Rust formatting ==="
if cargo fmt --version &>/dev/null; then
cargo fmt --manifest-path "$PROJECT_ROOT/Cargo.toml" --check
else
echo "Skipping Rust formatting check (rustfmt not installed)"
fi
echo "=== Running cargo clippy ==="
cargo clippy --manifest-path "$PROJECT_ROOT/Cargo.toml" -p huskies --all-targets
cargo clippy --manifest-path "$PROJECT_ROOT/Cargo.toml" --all-targets --all-features -- -D warnings
echo "=== Running Rust tests ==="
cargo test --manifest-path "$PROJECT_ROOT/Cargo.toml" --bin huskies