From 6f7cb8e6e7cb78a0dba56da7e014aea196e24e86 Mon Sep 17 00:00:00 2001 From: Laurent Caouissin Date: Wed, 22 Feb 2023 16:37:30 +0100 Subject: [PATCH] refactor: remove "build-configuration.json" file Keep only: - configuration.json - keycloak.json --- configuration/build-configuration.json | 7 ------- public/build-configuration.json | 7 ------- public/configuration.json | 2 +- scripts/env.sh | 2 -- src/utils/configuration/get-configuration.js | 3 +-- 5 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 configuration/build-configuration.json delete mode 100644 public/build-configuration.json diff --git a/configuration/build-configuration.json b/configuration/build-configuration.json deleted file mode 100644 index 9bce8478..00000000 --- a/configuration/build-configuration.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "authenticationType": "${AUTHENTICATION_TYPE}", - "_authenticationType_comment_": "Authentication type : OIDC or NONE", - "apiUrl": "${API_URL}", - "portail": "${PORTAIL_URL}", - "identityProvider": "${IDENTITY_PROVIDER}" -} diff --git a/public/build-configuration.json b/public/build-configuration.json deleted file mode 100644 index 9bce8478..00000000 --- a/public/build-configuration.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "authenticationType": "${AUTHENTICATION_TYPE}", - "_authenticationType_comment_": "Authentication type : OIDC or NONE", - "apiUrl": "${API_URL}", - "portail": "${PORTAIL_URL}", - "identityProvider": "${IDENTITY_PROVIDER}" -} diff --git a/public/configuration.json b/public/configuration.json index 9bce8478..3daba3af 100644 --- a/public/configuration.json +++ b/public/configuration.json @@ -1,5 +1,5 @@ { - "authenticationType": "${AUTHENTICATION_TYPE}", + "authenticationType": "NONE", "_authenticationType_comment_": "Authentication type : OIDC or NONE", "apiUrl": "${API_URL}", "portail": "${PORTAIL_URL}", diff --git a/scripts/env.sh b/scripts/env.sh index 2dcdefbe..49b14c01 100644 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -19,8 +19,6 @@ do done < .env envsubst < "./configuration.json" > "configuration.temp" -envsubst < "./build-configuration.json" > "build-configuration.temp" envsubst < "./keycloak.json" > "keycloak.temp" mv configuration.temp configuration.json -mv build-configuration.temp build-configuration.json mv keycloak.temp keycloak.json diff --git a/src/utils/configuration/get-configuration.js b/src/utils/configuration/get-configuration.js index 2df6b5e5..94155d42 100644 --- a/src/utils/configuration/get-configuration.js +++ b/src/utils/configuration/get-configuration.js @@ -2,8 +2,7 @@ import { getEnvVar } from './env'; const basePath = `${window.location.origin}`; -const nameConfigFile = - getEnvVar('NAME_CONFIG_FILE') ?? 'build-configuration.json'; +const nameConfigFile = getEnvVar('NAME_CONFIG_FILE') ?? 'configuration.json'; const nameOidcFile = getEnvVar('NAME_OIDC_FILE') ?? 'keycloak.json';