test passing information along connection

This commit is contained in:
Erica Portnoy 2020-07-13 15:02:15 -07:00
parent 000ba5e5f4
commit d853644140
3 changed files with 38 additions and 18 deletions

View file

@ -1,16 +1,22 @@
#!/bin/sh -e
cb_version="$(snapctl get internal-certbot-version)"
cb_version_2="$(snapctl get internal-certbot-version-2)"
echo "post cb_version $cb_version"
echo "post cb_version_2 $cb_version_2"
# get certbot version
cb_installed="$(snapctl get cb-installed)"
# cb_installed="$(snapctl get cb-installed)"
if [ -z "$cb_installed" ]; then
exit 0
fi
# if [ -z "$cb_installed" ]; then
# exit 0
# fi
# get required certbot version for plugin
cb_required=$(grep -oP "certbot>=\K.*(?=')" $SNAP/setup.py)
# # get required certbot version for plugin
# cb_required=$(grep -oP "certbot>=\K.*(?=')" $SNAP/setup.py)
if [ "$cb_installed" -lt "$cb_required" ]; then
echo "Certbot needs to be updated before this plugin can be updated; will try again on next refresh."
exit 1
fi
# if [ "$cb_installed" -lt "$cb_required" ]; then
# echo "Certbot needs to be updated before this plugin can be updated; will try again on next refresh."
# exit 1
# fi

View file

@ -1,11 +1,19 @@
#!/bin/sh -e
first_install="$(snapctl get first-install)"
if [ -z "$first_install" ]; then
snapctl set first-install="false"
exit 0
fi
cb_version="$(snapctl get :certbot certbot-version)"
cb_version_2="$(snapctl get :certbot-version certbot-version)"
snapctl set internal-cb-version=$cb_version
snapctl set internal-cb-version_2=$cb_version_2
cb_installed=$(grep -oP "__requires__ = 'certbot==\K.*(?=')" $SNAP/certbot-exec)
echo "cb_installed $cb_installed"
snapctl set cb-installed="$cb_installed"
echo "pre cb_version $cb_version"
echo "pre cb_version_2 $cb_version_2"
# first_install="$(snapctl get first-install)"
# if [ -z "$first_install" ]; then
# snapctl set first-install="false"
# exit 0
# fi
# cb_installed=$(grep -oP "__requires__ = 'certbot==\K.*(?=')" $SNAP/certbot-exec)
# echo "cb_installed $cb_installed"
# snapctl set cb-installed="$cb_installed"

View file

@ -0,0 +1,6 @@
#!/bin/sh -e
snapctl set :plugin certbot-version="test1"
snapctl set :certbot-version certbot-version="test2"