Bash script to deploy to different Expo environments (https://expo.io)
Expo now supports Release Channels! This script was created before that feature existed. You probably want to use them instead.
Bash script to deploy to different Expo environments.
It switches the relevant json file to be app.json
before running the correct commands.
npm install exp -g
/app.json
to your .gitignore
../deploy publish [environment]
./deploy build [environment]
(builds both IPA + APK files)cp ./config/staging.json ./app.json && react-native-scripts start
. I haven't thought of a better way to do this yet.It's also possible to have exp installed locally. To do this:
npm install exp --save-dev
package.json
, call the shell script through npm scripts. This is how I do it:
"publish": "chmod +x ./deploy.sh && ./deploy.sh publish $ENVIRONMENT",
"build": "chmod +x ./deploy.sh && ./deploy.sh build $ENVIRONMENT"
ENVIRONMENT=staging npm run publish
or ENVIRONMENT=staging npm run build