typo
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Set up endpoint for env retrieval
|
# Set up endpoint for env retrieval
|
||||||
echo "window._env_ = {" > /usr/share/nginx/html/env_config.js
|
echo "window._env_ = {" > /usr/share/nginx/html/env-config.js
|
||||||
|
|
||||||
# Collect enviroment variables for react
|
# Collect enviroment variables for react
|
||||||
eval enviroment_variables="$(env | grep REACT_APP.*=)"
|
eval enviroment_variables="$(env | grep REACT_APP.*=)"
|
||||||
@@ -12,7 +12,7 @@ eval enviroment_variables="$(env | grep REACT_APP.*=)"
|
|||||||
# Loop over variables
|
# Loop over variables
|
||||||
env | grep REACT_APP.*= | while read -r line;
|
env | grep REACT_APP.*= | while read -r line;
|
||||||
do
|
do
|
||||||
printf "%s',\n" $line | sed "s/=/:'/" >> /usr/share/nginx/html/env_config.js
|
printf "%s',\n" $line | sed "s/=/:'/" >> /usr/share/nginx/html/env-config.js
|
||||||
|
|
||||||
# Notify the user
|
# Notify the user
|
||||||
printf "Env variable %s' was injected into React App. \n" $line | sed "0,/=/{s//:'/}"
|
printf "Env variable %s' was injected into React App. \n" $line | sed "0,/=/{s//:'/}"
|
||||||
@@ -20,7 +20,7 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# End the object creation
|
# End the object creation
|
||||||
echo "}" >> /usr/share/nginx/html/env_config.js
|
echo "}" >> /usr/share/nginx/html/env-config.js
|
||||||
|
|
||||||
echo "Enviroment Variable Injection Complete."
|
echo "Enviroment Variable Injection Complete."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user