Adding modification check against the current /letsencrypt-auto

This commit is contained in:
Amjad Mashaal
2016-08-04 14:22:20 +02:00
parent eff181c68c
commit 1fdf41e636
3 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
# Print latest released version of LE to stdout:
python fetch.py --latest-version
# Download letsencrypt-auto script from git tag v1.2.3 into the folder I'm
# in, and make sure its signature verifies:
python fetch.py --le-auto-script v1.2.3
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
temp_dir=`mktemp -d`
# Script should be run from Certbot's root directory
cp letsencrypt-auto ${temp_dir}/to-be-checked
cp letsencrypt-auto-source/pieces/fetch.py ${temp_dir}/fetch.py
cd ${temp_dir}
LATEST_VERSION=`python fetch.py --latest-version`
python fetch.py --le-auto-script v${LATEST_VERSION}
cmp -s letsencrypt-auto to-be-checked
if [ $? != 0 ]; then
echo "Root letsencrypt-auto has changed."
rm -rf temp_dir
exit 1
fi
rm -rf temp_dir
+1
View File
@@ -84,6 +84,7 @@ commands =
# At the moment, this tests under Python 2.7 only, as only that version is
# readily available on the Trusty Docker image.
commands =
{toxinidir}/tests/modification-check.sh
docker build -t lea letsencrypt-auto-source
docker run --rm -t -i lea
whitelist_externals =