Skip to content

Commit 39e1bc2

Browse files
committed
blah
1 parent f2e2f07 commit 39e1bc2

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

staging/src/k8s.io/code-generator/examples/hack/update-codegen.sh

+11
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
2222
SCRIPT_ROOT="${SCRIPT_DIR}/.."
2323
CODEGEN_PKG="${CODEGEN_PKG:-"${SCRIPT_ROOT}/.."}"
2424

25+
print_stack_trace() {
26+
echo "*************************************************************************************"
27+
echo "Stack trace (most recent call first):"
28+
for ((i=${#FUNCNAME[@]}-1; i>=0; i--)); do
29+
echo " [${i}] ${FUNCNAME[i]}() called at ${BASH_SOURCE[i+1]}:${BASH_LINENO[i]}"
30+
done
31+
}
32+
33+
echo "update"
34+
print_stack_trace
35+
2536
source "${CODEGEN_PKG}/kube_codegen.sh"
2637

2738
THIS_PKG="k8s.io/code-generator/examples"

staging/src/k8s.io/code-generator/examples/hack/verify-codegen.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ cleanup
3232
mkdir -p "${TMP_DIFFROOT}"
3333
cp -a "${DIFFROOT}"/* "${TMP_DIFFROOT}"
3434

35+
# smoke test
36+
echo "verify"
37+
print_stack_trace() {
38+
echo "*************************************************************************************"
39+
echo "Stack trace (most recent call first):"
40+
for ((i=${#FUNCNAME[@]}-1; i>=0; i--)); do
41+
echo " [${i}] ${FUNCNAME[i]}() called at ${BASH_SOURCE[i+1]}:${BASH_LINENO[i]}"
42+
done
43+
}
44+
45+
print_stack_trace
46+
3547
"${SCRIPT_ROOT}/hack/update-codegen.sh"
3648
echo "diffing ${DIFFROOT} against freshly generated codegen"
3749
ret=0
@@ -43,7 +55,6 @@ else
4355
exit 1
4456
fi
4557

46-
# smoke test
4758
echo "Smoke testing examples by compiling..."
4859
pushd "${SCRIPT_ROOT}"
4960
go build "k8s.io/code-generator/examples/crd/..."

0 commit comments

Comments
 (0)