1
1
mirror of https://github.com/primer/css.git synced 2024-09-11 16:36:07 +03:00

updating the diff report to output diff

This commit is contained in:
Jon Rohan 2021-04-10 09:11:02 -07:00
parent 7b5843f27f
commit 600fa4fd0b
No known key found for this signature in database
GPG Key ID: B0BBE304A9A0AECB

View File

@ -11,16 +11,14 @@ function warn() {
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
cp "tmp/node_modules/@primer/css/dist/stats/primer.json" 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!'
diff -u {before,after}.txt
rm {before,after}.{json,txt}