pre-build

This commit is contained in:
Feruz 2019-01-03 21:24:54 +02:00
parent 92883c7aca
commit e2f34abad9

View File

@ -1,5 +1,18 @@
#!/usr/bin/env bash
# Creates an .env from ENV variables for use with react-native-config
GOOGLE_JSON_FILE=$APPCENTER_SOURCE_DIRECTORY/<path>/google-services.json
if [ -e "$GOOGLE_JSON_FILE" ]
then
echo "Updating Google Json"
echo "$GOOGLE_JSON" > $GOOGLE_JSON_FILE
sed -i -e 's/\\"/'\"'/g' $GOOGLE_JSON_FILE
echo "File content:"
cat $GOOGLE_JSON_FILE
fi
printf "Old .env file:\n"
cat .env
printf "Started script:\n"
@ -10,3 +23,4 @@ set | egrep -e $ENV_WHITELIST | egrep -v "^_" | egrep -v "WHITELIST" | egrep -v
printf "\n.env created with contents:\n"
cat .env
printf "\nEND OF .env\n"