From 85236d377656f4e5eb7232f852fa9211eeac505f Mon Sep 17 00:00:00 2001 From: 98jan Date: Wed, 25 Dec 2024 17:55:34 +0100 Subject: [PATCH] fix: update replace string to not replace key in files --- frontend/spa/docker/Dockerfile | 14 +++++++------- frontend/spa/docker/replaceEnvs.sh | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/spa/docker/Dockerfile b/frontend/spa/docker/Dockerfile index 5a754351..9a7d866a 100644 --- a/frontend/spa/docker/Dockerfile +++ b/frontend/spa/docker/Dockerfile @@ -2,13 +2,13 @@ FROM node:18 AS build # General -ENV VITE_TITLE="VITE_TITLE" -ENV VITE_GENERAL_DATE_FORMAT="VITE_GENERAL_DATE_FORMAT" -ENV VITE_GENERAL_CURRENCY_SYMBOL_AFTER="VITE_GENERAL_CURRENCY_SYMBOL_AFTER" -ENV VITE_KEYCLOAK_URL="VITE_KEYCLOAK_URL" -ENV VITE_KEYCLOAK_REALM="VITE_KEYCLOAK_REALM" -ENV VITE_KEYCLOAK_CLIENT_ID="VITE_KEYCLOAK_CLIENT_ID" -ENV VITE_API_URL="VITE_API_URL" +ENV VITE_TITLE="VITE_TITLE_VALUE" +ENV VITE_GENERAL_DATE_FORMAT="VITE_GENERAL_DATE_FORMAT_VALUE" +ENV VITE_GENERAL_CURRENCY_SYMBOL_AFTER="VITE_GENERAL_CURRENCY_SYMBOL_AFTER_VALUE" +ENV VITE_KEYCLOAK_URL="VITE_KEYCLOAK_URL_VALUE" +ENV VITE_KEYCLOAK_REALM="VITE_KEYCLOAK_REALM_VALUE" +ENV VITE_KEYCLOAK_CLIENT_ID="VITE_KEYCLOAK_CLIENT_ID_VALUE" +ENV VITE_API_URL="VITE_API_URL_VALUE" # Set the working directory WORKDIR /app diff --git a/frontend/spa/docker/replaceEnvs.sh b/frontend/spa/docker/replaceEnvs.sh index 61fa13b9..ebd21635 100644 --- a/frontend/spa/docker/replaceEnvs.sh +++ b/frontend/spa/docker/replaceEnvs.sh @@ -2,13 +2,13 @@ # Define a key-value map for search and replace strings declare -A STRING_MAP -STRING_MAP["VITE_TITLE"]=$VITE_TITLE -STRING_MAP["VITE_GENERAL_DATE_FORMAT"]=$VITE_GENERAL_DATE_FORMAT -STRING_MAP["VITE_GENERAL_CURRENCY_SYMBOL_AFTER"]=$VITE_GENERAL_CURRENCY_SYMBOL_AFTER -STRING_MAP["VITE_KEYCLOAK_URL"]=$VITE_KEYCLOAK_URL -STRING_MAP["VITE_KEYCLOAK_REALM"]=$VITE_KEYCLOAK_REALM -STRING_MAP["VITE_KEYCLOAK_CLIENT_ID"]=$VITE_KEYCLOAK_CLIENT_ID -STRING_MAP["VITE_API_URL"]=$VITE_API_URL +STRING_MAP["VITE_TITLE_VALUE"]=$VITE_TITLE +STRING_MAP["VITE_GENERAL_DATE_FORMAT_VALUE"]=$VITE_GENERAL_DATE_FORMAT +STRING_MAP["VITE_GENERAL_CURRENCY_SYMBOL_AFTER_VALUE"]=$VITE_GENERAL_CURRENCY_SYMBOL_AFTER +STRING_MAP["VITE_KEYCLOAK_URL_VALUE"]=$VITE_KEYCLOAK_URL +STRING_MAP["VITE_KEYCLOAK_REALM_VALUE"]=$VITE_KEYCLOAK_REALM +STRING_MAP["VITE_KEYCLOAK_CLIENT_ID_VALUE"]=$VITE_KEYCLOAK_CLIENT_ID +STRING_MAP["VITE_API_URL_VALUE"]=$VITE_API_URL # Specify the relative directory where you want to perform the replacement RELATIVE_DIRECTORY="./build"