From 9b0481e0da4a4270b5db72ac1562f9318b8f87e0 Mon Sep 17 00:00:00 2001 From: Eric Saxby Date: Wed, 23 Aug 2023 18:07:38 -0700 Subject: [PATCH] Use sed/grep for listing versions --- lib/utils.bash | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/utils.bash b/lib/utils.bash index 7522c8c..13bb3c1 100755 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -34,7 +34,12 @@ sort_versions() { } list_all_versions() { - curl -s "$SOURCE" | jq -r '.versions[].version' | sort_versions + curl -s "$SOURCE" \ + | sed 's/[,\[]/\n/g' \ + | sed 's/{//g' \ + | grep '"version":' \ + | sed 's/"version":"\(.*\)"/\1/g' \ + | sort_versions } release_url() {