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

missed out removing v from ALPINE_VERSION

This commit is contained in:
Jaryl Chng
2024-10-22 21:48:39 +08:00
parent 467a18ecfd
commit 9149f1272a

View File

@@ -10,8 +10,10 @@ INFO=$(curl https://duo.com/docs/checksums | grep 'https://dl.duosecurity.com/du
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)
ALPINE_VERSION='edge'
for ALPINE_VERSION in $(curl -s "https://pkgs.alpinelinux.org/packages?name=python${PYTHON_VERSION%.*.*}" | htmlq -w --text 'select#branch > option' | grep -v 'Branch' | grep -v 'edge' | tac | xargs); do
if curl -s "https://pkgs.alpinelinux.org/packages?name=python${PYTHON_VERSION%.*.*}&branch=${ALPINE_VERSION}" | grep -q ${PYTHON_VERSION%.*}; then
ALPINE_VERSION="${ALPINE_VERSION/v/}"
break
fi
done
@@ -19,7 +21,7 @@ done
echo "Latest: ${LATEST}"
echo "Checksum: ${CHECKSUM}"
echo "Python Version: ${PYTHON_VERSION}"
echo "Alpine Version: ${ALPINE_VERSION}"
echo "Alpine Version: ${ALPINE_VERSION/v/}"
if [[ (-n "${LATEST}" && "${LATEST}" != "${EXISTING}") ]]; then
mv build.template.yml build.yml