Upgrade a website with comparing before and after state
MIT License
Make snapshots of the HTML output of a website before/after an upgrade.
Were you ever nervous while upgrading/updating PHP interpreter, Redis server, Laravel framework, a PHP package, WordPress core or plugin?
Create snapshots in a timestamp-named directory.
wget https://example.com/.well-known/safe-upgrade/urls
wget -qSO- 1>page.html 2>page.headers
grep '</html>'
java -jar vnu.jar --errors-only
dos2unix
expand --tabs=4
xmlstarlet fo --html --recover 2>/dev/null
xmlstarlet ed --delete '//path'
xmllint --format
chromium --headless --screenshot=image.png
colordiff -rsu -x "*.headers" -x "*.html" -x "*.html.lf" -x "*.html.lf.space" -x "*.xml.original" $(ls -dtr [1-9]*/|tail -n 2)
compare -verbose -metric mae $(ls -tr [1-9]*/image.png|tail -n 2) diff01.png