π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[INFRA-1039] fix(deployments): find the latest release when the GitHub API returns compact JSON (#9916)
Akshat Jainb348e442e99c
diff --git a/deployments/cli/community/install.sh b/deployments/cli/community/install.shindex accd89c812..bae937673d 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" ]; thenecho "Failed to check for the latest release. Exiting..." >&2exit 1@@ -217,7 +217,9 @@ function install() {echo ""if [ "$APP_RELEASE" == "stable" ]; then- export APP_RELEASE=$(checkLatestRelease)+ # exit inside checkLatestRelease only leaves the $(...) subshell+ APP_RELEASE=$(checkLatestRelease) || exit 1+ export APP_RELEASEfilocal build_image=$(initialize)@@ -424,7 +426,8 @@ function restartServices() {startServices}function upgrade() {- local latest_release=$(checkLatestRelease)+ local latest_release+ latest_release=$(checkLatestRelease) || exit 1echo ""echo "Current release: $APP_RELEASE"diff --git a/deployments/swarm/community/swarm.sh b/deployments/swarm/community/swarm.shindex 02f170f4d3..8a1da47b1a 100755--- a/deployments/swarm/community/swarm.sh+++ b/deployments/swarm/community/swarm.sh@@ -38,7 +38,7 @@ EOFfunction 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" ]; thenecho "Failed to check for the latest release. Exiting..." >&2exit 1@@ -220,7 +220,7 @@ function deployStack() {if [ ! -f "$DOCKER_FILE_PATH" ] || [ ! -f "$DOCKER_ENV_PATH" ]; thenecho "Configuration files not found"echo "Downloading it now......"- APP_RELEASE=$(checkLatestRelease)+ APP_RELEASE=$(checkLatestRelease) || exit 1downloadfiif [ -z "$stack_name" ]; then@@ -335,7 +335,8 @@ function upgrade() {exit 1fi- local latest_release=$(checkLatestRelease)+ local latest_release+ latest_release=$(checkLatestRelease) || exit 1echo ""echo "Current release: $APP_RELEASE"