From 072e88114a976db739751176c54dfbe5235f006e Mon Sep 17 00:00:00 2001 From: Laurent Caouissin <38245508+laurentC35@users.noreply.github.com> Date: Mon, 26 Feb 2024 11:01:36 +0100 Subject: [PATCH] fix: env variable prod (#89) * chore: fix reading env variable * bumb: version to 2.1.3 --- .gitignore | 2 +- container/env.sh | 4 +--- index.html | 1 + package.json | 2 +- public/configuration.json | 1 - public/env-config.js | 1 + src/core/application/auth/provider/component.tsx | 9 +++------ src/core/infrastructure/hooks/useAuth.ts | 5 ++--- src/core/utils/configuration/get-configuration.ts | 5 ----- src/core/utils/configuration/index.ts | 1 - src/ui/index.tsx | 15 --------------- 11 files changed, 10 insertions(+), 36 deletions(-) delete mode 100644 public/configuration.json create mode 100644 public/env-config.js delete mode 100644 src/core/utils/configuration/get-configuration.ts diff --git a/.gitignore b/.gitignore index 2f90d2f..0df5249 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,4 @@ dist-ssr *.local # Temporary env files -env-config.js +/env-config.js diff --git a/container/env.sh b/container/env.sh index 48a4c33..5bc3eb1 100644 --- a/container/env.sh +++ b/container/env.sh @@ -26,6 +26,4 @@ do echo " $varname: \"$value\"," >> ./env-config.js done < .env -echo "}" >> ./env-config.js - -sed -i.bak 's~
]*>~&~' ./index.html \ No newline at end of file +echo "}" >> ./env-config.js \ No newline at end of file diff --git a/index.html b/index.html index d481eb0..7d9a122 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> +