From 827a074ffb16d32b6f25180e978dd2ace03247c4 Mon Sep 17 00:00:00 2001 From: Elia Bieri Date: Thu, 25 May 2023 14:16:43 +0200 Subject: [PATCH] Fix caprover deploy --- caprover_deploy.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/caprover_deploy.sh b/caprover_deploy.sh index 23a89760..f31cdba0 100755 --- a/caprover_deploy.sh +++ b/caprover_deploy.sh @@ -16,10 +16,6 @@ echo "$BRANCH_NAME_SLUG" DEFAULT_APP_NAME="vbv-$BRANCH_NAME_SLUG" APP_NAME=${1:-$DEFAULT_APP_NAME} -# remove multiple dashes and make sure it does not end with a dash -APP_NAME=$(echo "$APP_NAME" | sed -E 's/-+/-/g') -APP_NAME=$(echo "$APP_NAME" | sed 's/-\+$//') - # shorten APP_NAME to 32 characters # app names with more character seem to fail in some steps in CapRover # CapRover generates longer names out from the app name and there @@ -29,6 +25,10 @@ if (( ${#APP_NAME} > 32 )); then APP_NAME=$(echo -n "${APP_NAME:0:28}-${hash}") fi +# remove multiple dashes and make sure it does not end with a dash +APP_NAME=$(echo "$APP_NAME" | sed -E 's/-+/-/g') +APP_NAME=$(echo "$APP_NAME" | sed 's/-\+$//') + echo "Deploy to $APP_NAME" VITE_GRAPHQL_URL="/server/graphql/"