File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Check log.go files
2+ on : [ pull_request ]
3+
4+ jobs :
5+ check-logs :
6+ runs-on : ubuntu-4
7+
8+ steps :
9+ - name : Checkout
10+ uses : actions/checkout@v4
11+ with :
12+ fetch-depth : 0
13+
14+ - name : Set up Go 1.25.1
15+ uses : actions/setup-go@v5
16+ with :
17+ go-version : ' 1.25.1'
18+
19+ - name : Check log.go files
20+ run : |
21+ chmod +x hack/gen-logs.sh hack/check-logs.sh
22+ ./hack/check-logs.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ ROOT_DIR=" $( git rev-parse --show-toplevel 2> /dev/null || pwd) "
5+ cd " $ROOT_DIR "
6+
7+ # Regenerate all log.go files
8+ ./hack/gen-logs.sh
9+
10+ # Fail if that changed anything
11+ if ! git diff --quiet -- ./; then
12+ echo " ERROR: log.go files are out of date. Please run:"
13+ echo " ./hack/gen-logs.sh"
14+ echo " and commit the changes."
15+ echo
16+ git diff --stat -- ./ || true
17+ exit 1
18+ fi
19+
20+ echo " log.go files are up to date."
You can’t perform that action at this time.
0 commit comments