-
-
Save itcherry/b71fbb3897f973dc1b79fb803d49b55d to your computer and use it in GitHub Desktop.
React Native environment variables generator taken from CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $1 == 'stage' ] | |
then | |
read -d '' env << EOF | |
API_BASE=/new/api | |
SOME_YOUR_TOKEN_TOKEN=$SOME_YOUR_TOKEN_STAGE | |
# Add your tokens here | |
elif [ $1 == 'prod' ] | |
then | |
read -d '' env << EOF | |
API_BASE=/new/api | |
SOME_YOUR_TOKEN_TOKEN=$SOME_YOUR_TOKEN_PROD | |
# Add your tokens here | |
EOF | |
fi | |
echo "$env" > ~/YOUR_REACT_NATIVE_PROJECT_NAME/.env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment