switch to requiring certbot version >= plugin version

This commit is contained in:
Erica Portnoy 2020-07-21 14:13:14 -07:00
parent e3f12df03b
commit 63db51a7ee

View file

@ -7,8 +7,9 @@ if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
fi
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
# get required certbot version for plugin
cb_required=$(grep -oP "certbot>=\K.*(?=')" $SNAP/setup.py)
# get required certbot version for plugin. certbot version must be at least the plugin's
# version. note that this is not the required version in setup.py, but the version number itself.
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from packaging import version; sys.exit(1) if\