Skip to content

Commit

Permalink
Moved REACT Google Oath Client ENV variable definition to buildtime (…
Browse files Browse the repository at this point in the history
…as react doesnt do runtime variables)
  • Loading branch information
mluypaert committed Sep 21, 2023
1 parent 4cf1677 commit b38848e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ build: clean ui-build docker/${DEPLOY_JAR} \
./docker/

.PHONY: ui-build
ui-build: \
ui-build: google-oauth2-secrets \
$(call print-help,ui-build,\
Build JS and CSS file for release.)
@./scripts/build-ui.sh
@ export REACT_APP_GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID} && \
./scripts/build-ui.sh

.PHONY: clean
clean: \
Expand Down Expand Up @@ -129,7 +130,6 @@ ifndef GOOGLE_REDIRECT_URI
endif
@cp ebextensions-templates/${EB_APP_ENV_FILE} .ebextensions/
sed -i -r 's~(WB_DB_URI:\s+)".*"~\1"'"${WB_DB_URI}"'"~' .ebextensions/${EB_APP_ENV_FILE}
sed -i -r 's~(REACT_APP_GOOGLE_OAUTH_CLIENT_ID:\s+)".*"~\1"'"${GOOGLE_OAUTH_CLIENT_ID}"'"~' .ebextensions/${EB_APP_ENV_FILE}
sed -i -r 's~(API_GOOGLE_OAUTH_CLIENT_ID:\s+)".*"~\1"'"${GOOGLE_OAUTH_CLIENT_ID}"'"~' .ebextensions/${EB_APP_ENV_FILE}
sed -i -r 's~(API_GOOGLE_OAUTH_CLIENT_SECRET:\s+)".*"~\1"'"${GOOGLE_OAUTH_CLIENT_SECRET}"'"~' .ebextensions/${EB_APP_ENV_FILE}
sed -i -r 's~(GOOGLE_REDIRECT_URI:\s+)".*"~\1"'"${GOOGLE_REDIRECT_URI}"'"~' .ebextensions/${EB_APP_ENV_FILE}
Expand Down
1 change: 0 additions & 1 deletion ebextensions-templates/app-env.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ option_settings:
WB_NAMES_RELEASE: 0.0.0
WB_DB_URI: ""
GOOGLE_REDIRECT_URI: ""
REACT_APP_GOOGLE_OAUTH_CLIENT_ID: ""
API_GOOGLE_OAUTH_CLIENT_ID: ""
API_GOOGLE_OAUTH_CLIENT_SECRET: ""
_JAVA_OPTIONS: "-Xmx4g"

0 comments on commit b38848e

Please sign in to comment.