From 5e9b02bbffd1c1880d485e7e1ffa32eeeea0c433 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Fri, 29 Nov 2024 18:57:57 +0530 Subject: [PATCH] chore: Find version after backend is ready (#37861) --- start-https.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/start-https.sh b/start-https.sh index aaf0ac80254..b2e6599292f 100755 --- a/start-https.sh +++ b/start-https.sh @@ -86,12 +86,6 @@ if [[ ${backend-} == release ]]; then backend=https://release.app.appsmith.com fi -# Try to get a version from the "backend". If it's a full container, not just backend, then it'll give us a version. -APPSMITH_VERSION_ID="$( - curl -sS "${backend/host.docker.internal/localhost}/info" | grep -Eo '"version": ".+?"' | cut -d\" -f4 -)" -export APPSMITH_VERSION_ID - if [[ -z ${run_as-} ]]; then if type nginx; then run_as=nginx @@ -165,6 +159,14 @@ if [[ $backend =~ /$ ]]; then exit 1 fi +if [[ -n $backend ]]; then + # Try to get a version from the "backend". If it's a full container, not just backend, then it'll give us a version. + APPSMITH_VERSION_ID="$( + curl -vsS "${backend/host.docker.internal/localhost}/info" | grep -Eo '"version": ".+?"' | cut -d\" -f4 || true + )" + export APPSMITH_VERSION_ID +fi + if [[ -n ${env_file-} && ! -f $env_file ]]; then echo "I got --env-file as '$env_file', but I cannot access it." >&2 exit 1