File: weigh-in.sh

package info (click to toggle)
dygraphs 2.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,340 kB
  • sloc: javascript: 24,842; sh: 800; python: 581; makefile: 45
file content (23 lines) | stat: -rwxr-xr-x 615 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/mksh
# This tracks the effect of pull requests on the size of dygraphs.
# See https://github.com/danvk/travis-weigh-in
set -e
case $KSH_VERSION {
(*MIRBSD\ KSH*) ;;
(*) echo E: do not call me with bash or something; exit 255 ;;
}

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.min.js
  mkdir -p disttmp
  gzip -cn9 <dist/dygraph.min.js >disttmp/dygraph.min.js.gz
  python weigh_in.py disttmp/dygraph.min.js.gz
  rm -r disttmp

fi