Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions ci/licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand All @@ -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..."
Expand All @@ -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