Skip to content

Commit 20859ca

Browse files
authored
Merge pull request #1542 from justinsb/more_robust_apidiff
chore: make apidiff test more robust and informative
2 parents 6ed25bd + 9ef81b0 commit 20859ca

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

hack/verify-apidiff

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ apidiffs=$(go run github.com/joelanford/[email protected] ${APIDIFF_OLD_COMMIT}
3333
filtered=$(echo "$apidiffs" | grep -E 'cluster-api-provider-gcp/(api/|exp/api/)' || true)
3434

3535
if [[ -n "$filtered" ]]; then
36-
echo "API differences found in api/ or exp/api/:"
36+
echo "API differences found in api/ or exp/api/ packages."
37+
echo ""
38+
echo "Full set of differences found by go-apidiff:"
3739
echo "$apidiffs"
3840
exit 1
3941
else
40-
echo "No differences found in api/ or exp/api/ packages"
42+
echo "No differences found in api/ or exp/api/ packages."
43+
echo ""
44+
echo "Full set of differences found by go-apidiff:"
45+
echo "$apidiffs"
4146
fi

scripts/ci-apidiff.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2222

2323
cd "${REPO_ROOT}"
2424

25-
APIDIFF_OLD_COMMIT="${PULL_BASE_SHA}" make apidiff
25+
APIDIFF_OLD_COMMIT="${PULL_BASE_SHA}" exec make apidiff

0 commit comments

Comments
 (0)