From: Dan Vanderkam Date: Mon, 16 Nov 2015 20:49:16 +0000 (-0500) Subject: Merge pull request #693 from danvk/opt-size-check X-Git-Tag: v2.0.0~32 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=34b957edacfc4af7c35d370bd8eb690ee7ab7a62;hp=961b513bfe7d680506b4025b4dfb68aa6393bb4f;p=dygraphs.git Merge pull request #693 from danvk/opt-size-check Optionalize size check --- diff --git a/scripts/weigh-in.sh b/scripts/weigh-in.sh index e58f786..b46f8c8 100755 --- a/scripts/weigh-in.sh +++ b/scripts/weigh-in.sh @@ -3,7 +3,15 @@ # See https://github.com/danvk/travis-weigh-in set -o errexit -curl -O https://raw.githubusercontent.com/danvk/travis-weigh-in/master/weigh_in.py -python weigh_in.py dist/dygraph-combined.js -gzip -c dist/dygraph.min.js > dist/dygraph.min.js.gz -python weigh_in.py dist/dygraph.min.js.gz +if [ -z "$GITHUB_TOKEN" ]; then + echo "GITHUB_TOKEN not set. Skipping size checks." + exit 0 + +else + + curl -O https://raw.githubusercontent.com/danvk/travis-weigh-in/master/weigh_in.py + python weigh_in.py dist/dygraph-combined.js + gzip -c dist/dygraph.min.js > dist/dygraph.min.js.gz + python weigh_in.py dist/dygraph.min.js.gz + +fi