network/.githooks/pre-push
anonpenguin23 30d18aca02 feat: add RQLite command support and help documentation
- Introduced a new RQLite command in the CLI to handle RQLite-related operations.
- Implemented the 'fix' subcommand to automatically repair common RQLite cluster issues, including correcting misconfigured join addresses and cleaning stale raft state.
- Updated help documentation to include RQLite commands and their usage.
2025-11-03 07:10:25 +02:00

30 lines
773 B
Bash

#!/bin/bash
# Get the directory where this hook is located
HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$HOOK_DIR/.." && pwd)"
CHANGELOG_SCRIPT="$REPO_ROOT/scripts/update_changelog.sh"
# Update changelog before push
if [ -f "$CHANGELOG_SCRIPT" ]; then
echo -e "\nUpdating changelog..."
bash "$CHANGELOG_SCRIPT"
changelog_status=$?
if [ $changelog_status -ne 0 ]; then
echo "Push aborted: changelog update failed."
exit 1
fi
else
echo "Warning: changelog update script not found at $CHANGELOG_SCRIPT"
fi
echo -e "\nRunning tests:"
go test ./... # Runs all tests in your repo
status=$?
if [ $status -ne 0 ]; then
echo "Push aborted: some tests failed."
exit 1
else
echo "All tests passed. Proceeding with push."
fi