From 0822a265c37ddeee0986616c12ed60be1bb5b100 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Tue, 16 Dec 2025 22:44:15 -0800 Subject: [PATCH] Update precommit --- .husky/pre-commit | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index d57b0b9..98e8ab4 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -5,23 +5,8 @@ if git diff --cached --name-only | grep -q "^package.json$"; then git add pnpm-lock.yaml fi -# Check if entry needs rebuilding -# Rebuild if: entry.ts/esbuild.config.js/.ts files are staged, OR if entry is out of date -NEEDS_REBUILD=false - -# Check staged files +# Check if entry needs rebuilding (entry.ts, esbuild.config.js, or any .ts files) if git diff --cached --name-only | grep -qE "^(entry\.ts|esbuild\.config\.js|.*\.ts)$"; then - NEEDS_REBUILD=true -fi - -# Check if entry is out of date compared to entry.ts -if [ -f entry.ts ] && [ -f entry ]; then - if [ entry.ts -nt entry ] || [ esbuild.config.js -nt entry ]; then - NEEDS_REBUILD=true - fi -fi - -if [ "$NEEDS_REBUILD" = true ]; then echo "🔨 Building action..." pnpm build git add entry