mirror of
https://github.com/primer/css.git
synced 2024-12-11 11:16:04 +03:00
27 lines
473 B
Bash
Executable File
27 lines
473 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
function log() {
|
|
echo "$@" 1>&2
|
|
}
|
|
|
|
function warn() {
|
|
echo "$@" 1>&2
|
|
}
|
|
|
|
pkg="@primer/css"
|
|
path="dist/stats/primer.json"
|
|
warn "Pulling the old $path from unpkg.com..."
|
|
curl -sL "https://unpkg.com/$pkg/$path" > before.json
|
|
|
|
warn "Building the stats locally..."
|
|
cp $path after.json
|
|
|
|
key=".selectors.values[]"
|
|
jq -r $key before.json > before.txt
|
|
jq -r $key after.json > after.txt
|
|
|
|
diff {before,after}.txt && echo 'no diff!'
|
|
|
|
rm {before,after}.{json,txt}
|