mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-12-11 10:18:50 +00:00
- 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.
30 lines
773 B
Bash
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
|