Skip to content

Commit

Permalink
Correct test scripts for new build location, scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
bensteinberg committed Sep 2, 2020
1 parent 092fffc commit 9ff04fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/compare_sitemap.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
mkdir tmp

echo "Comparing live sitemap to builds/dev/sitemap.xml..."
curl -s http://lil.law.harvard.edu/sitemap.xml > tmp/live.xml
diff -u -B <(grep -vE '^<lastmod>.*</lastmod>$' tmp/live.xml) <(grep -vE '^<lastmod>.*</lastmod>$' builds/prod/sitemap.xml) >> tmp/errors.txt
echo "Comparing live sitemap to build/sitemap.xml..."
curl -s https://lil.law.harvard.edu/sitemap.xml > tmp/live.xml
diff -u -B <(grep -vE '^<lastmod>.*</lastmod>$' tmp/live.xml) <(grep -vE '^<lastmod>.*</lastmod>$' build/sitemap.xml) >> tmp/errors.txt
echo ""

cat tmp/errors.txt >&2
Expand Down
6 changes: 3 additions & 3 deletions tests/find_relics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
mkdir tmp

echo "Looking for Liquid errors, rendered in the pages..."
grep -Einor --include=*.html "Liquid error:" builds/dev >> tmp/errors.txt
grep -Einor --include=*.html "Liquid error:" build >> tmp/errors.txt
echo "Looking for unrendered markdown links..."
grep -Enor --include=*.html "\[.*\]\(.*\)" builds/dev | grep -Evf tests/config/exclude_md_links.txt >> tmp/errors.txt
grep -Enor --include=*.html "\[.*\]\(.*\)" build | grep -Evf tests/config/exclude_md_links.txt >> tmp/errors.txt
# (Not working yet... finds acceptable braces)
# echo "Looking for braces (relics of liquid tags, kramdown)..."
# grep -Enor --include=*.html ".{0,15}[{}].{0,15}" builds/dev | grep -Evf tests/config/exclude_braces.txt >> tmp/errors.txt
# grep -Enor --include=*.html ".{0,15}[{}].{0,15}" build | grep -Evf tests/config/exclude_braces.txt >> tmp/errors.txt
echo ""

cat tmp/errors.txt >&2
Expand Down

0 comments on commit 9ff04fd

Please sign in to comment.