diff --git a/bin/populate_env b/bin/populate_env index ee7c0055..f508fb47 100755 --- a/bin/populate_env +++ b/bin/populate_env @@ -14,7 +14,8 @@ brand_name="${REACT_APP_UI_BRAND_NAME}" tranql_url="${REACT_APP_TRANQL_URL:-\/tranql}" hidden_result_tabs="${REACT_APP_HIDDEN_RESULT_TABS}" deployment_namespace="${REACT_APP_DEPLOYMENT_NAMESPACE}" -appstore_asset_branch="${REACT_APP_APPSTORE_ASSET_BRANCH}" +appstore_asset_base_url="${REACT_APP_APPSTORE_ASSET_BASE_URL:-https:\/\/raw.githubusercontent.com\/helxplatform\/appstore}" +appstore_asset_branch="${REACT_APP_APPSTORE_ASSET_BRANCH:-master}" analytics_enabled="${REACT_APP_ANALYTICS_ENABLED:-false}" analytics_platform="${REACT_APP_ANALYTICS_PLATFORM}" analytics_token="${REACT_APP_ANALYTICS_TOKEN}" @@ -40,6 +41,7 @@ template='{ }, "hidden_result_tabs": "%HIDDEN_RESULT_TABS%", "deployment_namespace": "%DEPLOYMENT_NAMESPACE%", + "appstore_asset_base_url": "%APPSTORE_ASSET_BASE_URL%", "appstore_asset_branch": "%APPSTORE_ASSET_BRANCH%", "meta": { "title": "%META_TITLE%", @@ -62,6 +64,7 @@ echo "$template" | sed \ -e "s/%HIDDEN_RESULT_TABS%/$hidden_result_tabs/" \ -e "s/%TRANQL_URL%/$tranql_url/" \ -e "s/%DEPLOYMENT_NAMESPACE%/$deployment_namespace/" \ + -e "s/%APPSTORE_ASSET_BASE_URL%/$appstore_asset_base_url/" \ -e "s/%APPSTORE_ASSET_BRANCH%/$appstore_asset_branch/" \ -e "s/%ANALYTICS_ENABLED%/$analytics_enabled/" \ -e "s/%ANALYTICS_PLATFORM%/$analytics_platform/" \ diff --git a/src/contexts/environment-context.js b/src/contexts/environment-context.js index 1449a9e4..cf7c7d0b 100644 --- a/src/contexts/environment-context.js +++ b/src/contexts/environment-context.js @@ -131,7 +131,7 @@ export const EnvironmentProvider = ({ children }) => { let brandAssetFolder = context.brand // `catalyst` is the supported name, but support `cat` and `bdc` as well. if (brandAssetFolder === "cat" || brandAssetFolder === "bdc") brandAssetFolder = "bdc" - context.logo_url = `https://raw.githubusercontent.com/helxplatform/appstore/${ context.appstore_asset_branch }/appstore/core/static/images/${ brandAssetFolder }/logo.png` + context.logo_url = `${ context.appstore_asset_base_url }/${ context.appstore_asset_branch }/appstore/core/static/images/${ brandAssetFolder }/logo.png` setContext(context); setIsLoadingContext(false); }