From 19327c8b7abeddc202c1bb597d1ecfd0d0ae6fc1 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Mon, 19 Aug 2019 09:24:21 -0700 Subject: [PATCH] Show all license diffs (#11034) Instead of gathering all license diffs but only showing the changes to the first directory that has a diff, show all diffs before exiting licenses.sh. Fixes https://github.com/flutter/flutter/issues/38634 --- ci/licenses.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/ci/licenses.sh b/ci/licenses.sh index eed3fb42e..d411c875b 100755 --- a/ci/licenses.sh +++ b/ci/licenses.sh @@ -5,6 +5,8 @@ shopt -s nullglob echo "Verifying license script is still happy..." echo "Using pub from `which pub`, dart from `which dart`" +exitStatus=0 + dart --version (cd flutter/tools/licenses; pub get; dart --enable-asserts lib/main.dart --src ../../.. --out ../../../out/license_script_output --golden ../../ci/licenses_golden) @@ -22,7 +24,9 @@ for f in out/license_script_output/licenses_*; do echo " https://github.com/flutter/engine/tree/master/tools/licenses" echo "" diff -U 6 flutter/ci/licenses_golden/$(basename $f) $f - exit 1 + echo "=================================================================" + echo "" + exitStatus=1 fi done @@ -41,7 +45,9 @@ then echo " https://github.com/flutter/engine/tree/master/tools/licenses" echo "" diff -U 6 flutter/ci/licenses_golden/tool_signature out/license_script_output/tool_signature - exit 1 + echo "=================================================================" + echo "" + exitStatus=1 fi echo "Checking license count in licenses_flutter..." @@ -60,8 +66,13 @@ then echo "Files in 'third_party/txt' may have an Apache license header instead." echo "If you're absolutely sure that the change in license count is" echo "intentional, update 'flutter/ci/licenses.sh' with the new count." - exit 1 + echo "=================================================================" + echo "" + exitStatus=1 fi -echo "Licenses are as expected." -exit 0 +if [ "$exitStatus" -eq "0" ] +then + echo "Licenses are as expected." +fi +exit $exitStatus -- GitLab