Compare commits

..

No commits in common. "374d29018adfc71f63e66b28938eb9c683bdc423" and "70085f5258986a9641802306d253d60d6304a6ae" have entirely different histories.

25 changed files with 2 additions and 22 deletions

Binary file not shown.

Binary file not shown.

View File

@ -2,9 +2,6 @@
# Pre-push hook to generate PDFs before pushing
# This ensures PDFs are always up to date when code is pushed
# Capture remote from arguments
REMOTE="$1"
# Don't exit on error immediately - we want to report issues but not break the push
set +e
@ -86,25 +83,7 @@ if PUPPETEER_EXECUTABLE_PATH="$CHROME_PATH" npm run generate-pdfs; then
# Check if there are changes staged
if ! git diff --cached --quiet --exit-code "$PDFS_DIR" 2>/dev/null; then
echo "✓ PDFs updated. Committing changes..."
# Commit the changes
if git commit -m "Auto-update generated PDFs" --no-verify; then
echo "✓ Changes committed. Restarting push..."
# Push the new commit
# We use --no-verify to skip running this hook again since we just ran it
if git push "$REMOTE" --no-verify; then
echo "✓ Push successful."
exit 1 # Cancel the original push since we just pushed the new state
else
echo "✗ Failed to push updated PDFs."
exit 1
fi
else
echo "✗ Failed to commit updated PDFs."
exit 1
fi
echo "✓ PDFs updated and staged for commit"
fi
fi
fi
@ -114,3 +93,4 @@ else
fi
exit 0