mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 04:52:08 +00:00
improve report on failures summarizing the modules with incompatible changes
This commit is contained in:
parent
7de94d43ca
commit
affafd906d
@ -206,7 +206,7 @@ inWorktree "${KUBE_TEMP}/base" "${base}" run "${KUBE_TEMP}/before"
|
|||||||
# be non-zero if there are incompatible changes.
|
# be non-zero if there are incompatible changes.
|
||||||
#
|
#
|
||||||
# The report is Markdown-formatted and can be copied into a PR comment verbatim.
|
# The report is Markdown-formatted and can be copied into a PR comment verbatim.
|
||||||
res=0
|
failures=()
|
||||||
echo
|
echo
|
||||||
compare () {
|
compare () {
|
||||||
what="$1"
|
what="$1"
|
||||||
@ -226,7 +226,7 @@ compare () {
|
|||||||
fi
|
fi
|
||||||
incompatible=$(apidiff -incompatible -m "${before}" "${after}" 2>&1) || true
|
incompatible=$(apidiff -incompatible -m "${before}" "${after}" 2>&1) || true
|
||||||
if [ -n "$incompatible" ]; then
|
if [ -n "$incompatible" ]; then
|
||||||
res=1
|
failures+=("${what}")
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,7 +263,11 @@ tryBuild () {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $res -ne 0 ]; then
|
res=0
|
||||||
|
if [ ${#failures[@]} -gt 0 ]; then
|
||||||
|
res=1
|
||||||
|
echo "Detected incompatible changes on modules:"
|
||||||
|
printf '%s\n' "${failures[@]}"
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
Some notes about API differences:
|
Some notes about API differences:
|
||||||
|
Loading…
Reference in New Issue
Block a user