1
0
mirror of https://gitlab.com/jarylc/docker-duoauthproxy.git synced 2026-02-12 12:31:16 +00:00

dynamically retrieve python version from changelog and use py3-cryptography package instead

This commit is contained in:
Jaryl Chng
2024-05-01 23:43:11 +08:00
parent 98f696eaa9
commit aa597c368d
4 changed files with 19 additions and 11 deletions

View File

@@ -13,12 +13,16 @@ else
INFO=$(curl https://duo.com/docs/checksums | grep 'https://dl.duosecurity.com/duoauthproxy' | grep 'src.tgz' | rev | cut -d'>' -f1 | rev)
CHECKSUM=$(echo "$INFO" | cut -d' ' -f1)
LATEST=$(echo "$INFO" | cut -d'-' -f2)
PYTHON_VERSION=$(curl https://duo.com/docs/authproxy-notes | grep -Eo 'Python to \d+.\d+.\d+' | head -n1 | rev | cut -d' ' -f1 | rev)
echo "Latest: ${LATEST}"
echo "Checksum: ${CHECKSUM}"
echo "Python Version: ${PYTHON_VERSION}"
fi
if [[ (-n "${LATEST}" && "${LATEST}" != "${EXISTING}") ]]; then
mv build.template.yml build.yml
sed -i "s \$CHECKSUM ${CHECKSUM} g" 'build.yml'
sed -i "s \$LATEST ${LATEST} g" 'build.yml'
sed -i "s \$PYTHON_VERSION ${PYTHON_VERSION} g" 'build.yml'
echo "Building..."
fi