Chris Bracken a2a3dc05ae
Catch divide-by-zero errors early in license tool (#4382)
If Progress is instantiated with a max of 0, throw immediately to avoid
a divide-by-zero later in toString(). This typically happens if the tool
recurses over an empty top-level component, which can happen when a
component is moved around in the repo and the developer hasn't cleaned
up old empty directories from their git client.
2017-11-21 15:42:17 -08:00
..

To update the golden license files, make sure you've rebased your branch to the latest upstream master and then run the following in this directory:

pub get
gclient sync
rm -rf ../../../out/licenses
dart lib/main.dart --src ../../.. --out ../../../out/licenses --golden ../../travis/licenses_golden

Then copy any affected files from ../../../out/licenses to ../../travis/licenses_golden and add them to your change.

The sky/packages/sky_engine/LICENSE file is included in product releases and should be updated any time the golden file changes in a way that involves changes to anything other than the FILE lines. To update this file, run:

pub get
gclient sync
dart lib/main.dart --release --src ../../.. --out ../../../out/licenses > ../../sky/packages/sky_engine/LICENSE