Merge pull request #693 from danvk/opt-size-check
[dygraphs.git] / scripts / weigh-in.sh
1 #!/bin/bash
2 # This tracks the effect of pull requests on the size of dygraphs.
3 # See https://github.com/danvk/travis-weigh-in
4 set -o errexit
5
6 if [ -z "$GITHUB_TOKEN" ]; then
7 echo "GITHUB_TOKEN not set. Skipping size checks."
8 exit 0
9
10 else
11
12 curl -O https://raw.githubusercontent.com/danvk/travis-weigh-in/master/weigh_in.py
13 python weigh_in.py dist/dygraph-combined.js
14 gzip -c dist/dygraph.min.js > dist/dygraph.min.js.gz
15 python weigh_in.py dist/dygraph.min.js.gz
16
17 fi