From fa7f52dab0d78f001bbfb120ed182597c4d82ab8 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 30 May 2018 17:07:28 -0400 Subject: [PATCH] [jenkins] Improve api/generator diff reporting to say if there were changes, and if they were breaking or not. (#4138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For the api diff for this PR we now show: * `🔥 breaking changes 🔥`: If there are any breaking changes in the api diff (for this PR). * `please review changes`: If there are any non-breaking changes in the api diff. * `no change`: If the api diff is empty. For the generator diff we show: * `only version changes`: If there were only changes related to version numbers (since the XI/XM version number is added to the generator, that version number will always show up as a diff when comparing the generated source code) * `please review changes`: If anything other that version numbers changed in the generated source code. --- jenkins/compare.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/jenkins/compare.sh b/jenkins/compare.sh index a2f560325d..afd98cc8e1 100755 --- a/jenkins/compare.sh +++ b/jenkins/compare.sh @@ -34,5 +34,20 @@ cp -R tools/comparison/apidiff/diff jenkins-results/apicomparison/ cp tools/comparison/apidiff/*.html jenkins-results/apicomparison/ cp -R tools/comparison/generator-diff jenkins-results/generator-diff -printf "✅ [API Diff (from PR only)](%s/API_20diff_20_28PR_20only_29)\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md" -printf "✅ [Generator Diff](%s/Generator_20Diff)\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md" +printf "✅ [API Diff (from PR only)](%s/API_20diff_20_28PR_20only_29)" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md" +if ! grep "href=" jenkins-results/apicomparison/api-diff.html >/dev/null 2>&1; then + printf " (no change)" >> "$WORKSPACE/jenkins/pr-comments.md" +elif perl -0777 -pe 's/