From 9149f1272ad7b514c8608a084dfc24a094194dd5 Mon Sep 17 00:00:00 2001 From: Jaryl Chng Date: Tue, 22 Oct 2024 21:48:39 +0800 Subject: [PATCH] missed out removing `v` from ALPINE_VERSION --- check.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/check.sh b/check.sh index 57855d6..10d98b6 100755 --- a/check.sh +++ b/check.sh @@ -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