1
1
mirror of https://github.com/primer/css.git synced 2024-12-29 00:58:31 +03:00

fix(selector-diff-report): always rebuild the data

This commit is contained in:
Shawn Allen 2019-02-28 15:19:53 -08:00
parent 68130d54c1
commit 8cc63dbef3

View File

@ -5,15 +5,17 @@ function log() {
echo "$@" 1>&2
}
function warn() {
echo "$@" 1>&2
}
pkg="@primer/css"
path="dist/stats/primer.json"
log "Pulling the old $path from unpkg.com..."
warn "Pulling the old $path from unpkg.com..."
curl -sL "https://unpkg.com/$pkg/$path" > before.json
if [[ ! -f $path ]]; then
log "Building the stats locally..."
npm run dist
fi
warn "Building the stats locally..."
npm run dist
cp $path after.json
function list_selectors() {
@ -24,10 +26,6 @@ key=".selectors.values[]"
jq -r $key before.json > before.txt
jq -r $key after.json > after.txt
function warn() {
echo "$@" 1>&2
}
warn "[selector report] diff:"
(diff before.txt after.txt | tee selector-diff.log) || log "(no diff!)"
warn "[selector report] end"