From bfcea2b238a1fd8dc161b6f0f6919734dc2b6dcd Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 3 Mar 2026 23:59:39 +0000 Subject: [PATCH] clickhouse: update.sh: Paginate GitHub tags API to find LTS releases --- pkgs/by-name/cl/clickhouse/update.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/cl/clickhouse/update.sh b/pkgs/by-name/cl/clickhouse/update.sh index 7ca2b419d322..6aed2d646818 100755 --- a/pkgs/by-name/cl/clickhouse/update.sh +++ b/pkgs/by-name/cl/clickhouse/update.sh @@ -15,9 +15,11 @@ echoerr "Working on $fname" shift # Fetch latest tags from the repo, leave only stable and lts, use version sort in reverse order. -all_tags=$(curl -L -s ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} https://api.github.com/repos/ClickHouse/ClickHouse/tags \ +all_tags=$({ for page in 1 2 3; do + curl -L -s ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} "https://api.github.com/repos/ClickHouse/ClickHouse/tags?per_page=100&page=$page" + done; } \ | jq -r '.[].name | select(test("-(stable|lts)$"))' \ - | sort -Vr) + | sort -Vr | uniq) # Fail if no tags found if [[ -z "$all_tags" ]]; then