From 7429c8c859fe70d4796fa05a9d0bba01aab4443b Mon Sep 17 00:00:00 2001 From: Jaryl Chng Date: Tue, 22 Oct 2024 21:52:39 +0800 Subject: [PATCH] missed out consuming ALPINE_VERSION in build.sh --- build.sh | 4 ++-- check.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 25a8776..a359792 100755 --- a/build.sh +++ b/build.sh @@ -19,6 +19,6 @@ docker buildx create --use --name builder docker buildx inspect --bootstrap builder docker buildx install -docker buildx build --cache-to=type=local,dest=cache,mode=max --build-arg VERSION --build-arg CHECKSUM --build-arg PYTHON_VERSION --platform "linux/${ARCH}" -t "${REGISTRY_IMAGE}:${ARCH/\//}" . +docker buildx build --cache-to=type=local,dest=cache,mode=max --build-arg VERSION --build-arg CHECKSUM --build-arg PYTHON_VERSION --build-arg ALPINE_VERSION --platform "linux/${ARCH}" -t "${REGISTRY_IMAGE}:${ARCH/\//}" . echo "${TOKEN}" | docker login -u "${USERNAME}" --password-stdin ${REGISTRY} -docker buildx build --push --cache-from=type=local,src=cache --build-arg VERSION --build-arg CHECKSUM --build-arg PYTHON_VERSION --platform "linux/${ARCH}" -t "${REGISTRY_IMAGE}:${ARCH/\//}" . +docker buildx build --push --cache-from=type=local,src=cache --build-arg VERSION --build-arg CHECKSUM --build-arg PYTHON_VERSION --build-arg ALPINE_VERSION --platform "linux/${ARCH}" -t "${REGISTRY_IMAGE}:${ARCH/\//}" . diff --git a/check.sh b/check.sh index 10d98b6..8d644bc 100755 --- a/check.sh +++ b/check.sh @@ -6,10 +6,10 @@ apk add curl jq htmlq EXISTING=$(cat EXISTING) echo "Existing: ${EXISTING}" -INFO=$(curl https://duo.com/docs/checksums | grep 'https://dl.duosecurity.com/duoauthproxy' | grep 'src.tgz' | rev | cut -d'>' -f1 | rev) +INFO=$(curl -s 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) +PYTHON_VERSION=$(curl -s 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