From 4014d33c6e160f2474d896edc31060a0d43c266f Mon Sep 17 00:00:00 2001 From: David Mzareulyan Date: Sun, 9 Aug 2026 16:22:39 +0300 Subject: [PATCH] Fix release tag parsing to tolerate spaces around JSON colon --- deployments/cli/community/install.sh | 2 +- deployments/swarm/community/swarm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployments/cli/community/install.sh b/deployments/cli/community/install.sh index accd89c812d..1e453298b14 100755 --- a/deployments/cli/community/install.sh +++ b/deployments/cli/community/install.sh @@ -57,7 +57,7 @@ function spinner() { function checkLatestRelease(){ echo "Checking for the latest release..." >&2 - local latest_release=$(curl -sSL https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name": "[^"]*"' | sed 's/"tag_name": "//;s/"//g') + local latest_release=$(curl -sSL https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name" *: *"[^"]*"' | sed 's/"tag_name" *: *"//;s/"//g') if [ -z "$latest_release" ]; then echo "Failed to check for the latest release. Exiting..." >&2 exit 1 diff --git a/deployments/swarm/community/swarm.sh b/deployments/swarm/community/swarm.sh index 02f170f4d37..c596e9e8ac5 100755 --- a/deployments/swarm/community/swarm.sh +++ b/deployments/swarm/community/swarm.sh @@ -38,7 +38,7 @@ EOF function checkLatestRelease(){ echo "Checking for the latest release..." >&2 - local latest_release=$(curl -s https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name": "[^"]*"' | sed 's/"tag_name": "//;s/"//g') + local latest_release=$(curl -s https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name" *: *"[^"]*"' | sed 's/"tag_name" *: *"//;s/"//g') if [ -z "$latest_release" ]; then echo "Failed to check for the latest release. Exiting..." >&2 exit 1