mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-04-19 03:01:06 -04:00
**What does this PR do? Why is it needed?** Fixing a bug in `check-logs.sh` where untracked files were ignored. for example PR #16216 passed the check while it shouldn't have. this change fixes the problem.
22 lines
546 B
Bash
Executable File
22 lines
546 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
cd "$ROOT_DIR"
|
|
|
|
# Regenerate all log.go files
|
|
./hack/gen-logs.sh
|
|
|
|
# Fail if that changed anything
|
|
if ! git diff --quiet -- ./ || [[ -n "$(git ls-files --others --exclude-standard -- ./)" ]]; then
|
|
echo "ERROR: log.go files are out of date. Please run:"
|
|
echo " ./hack/gen-logs.sh"
|
|
echo "and commit the changes."
|
|
echo
|
|
git diff --stat -- ./ || true
|
|
git status --porcelain -- ./ || true
|
|
exit 1
|
|
fi
|
|
|
|
echo "log.go files are up to date."
|