Skip to content

Commit

Permalink
chore: Find version after backend is ready (appsmithorg#37861)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharat87 authored Nov 29, 2024
1 parent d7d1e3a commit 5e9b02b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions start-https.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5e9b02b

Please sign in to comment.