Skip to content

Commit

Permalink
try out direct script usage on CI
Browse files Browse the repository at this point in the history
verify index.html patching
  • Loading branch information
gottfired committed May 4, 2023
1 parent cb9ce70 commit e346480
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion template/scripts/test-docker-entrypoint.sh
Expand Up @@ -27,7 +27,7 @@ REACT_APP_DEPLOYMENT_ENV=$ENV

# Run script with source so REACT_XYZ ate visible
# "test" param is used to skip exec "$@" at the end of the script
source docker-entrypoint-test.sh "test"
source docker-entrypoint.sh "test"

# Verify nginx config was patched correctly
if ! grep -q "location $BASE {" "$NGINX_CONF" || ! grep -q "location $BASE/static {" "$NGINX_CONF"; then
Expand All @@ -45,6 +45,12 @@ if ! grep -q "ENV_BASE_NAME = \"$BASE\"" "$CONFIG_JS" || \
exit 1
fi

# Verify index.html was patched correctly
if ! grep -q "<base href=\"$BASE/\">" "$INDEX_HTML"; then
echo "index.html not patched successfully"
cat $INDEX_HTML
fi

# Cleanup
rm -rf /etc/nginx
rm docker-entrypoint-test.sh
Expand Down

0 comments on commit e346480

Please sign in to comment.