https://github.com/oliverbenns/expo-deploy
Bash script to deploy to different Expo environments (https://expo.io)
https://github.com/oliverbenns/expo-deploy
bash create-react-native-app exp expo exponent react-native
Last synced: about 1 year ago
JSON representation
Bash script to deploy to different Expo environments (https://expo.io)
- Host: GitHub
- URL: https://github.com/oliverbenns/expo-deploy
- Owner: oliverbenns
- License: mit
- Created: 2017-08-01T09:58:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T10:01:54.000Z (about 8 years ago)
- Last Synced: 2025-02-28T21:02:46.762Z (over 1 year ago)
- Topics: bash, create-react-native-app, exp, expo, exponent, react-native
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 40
- Watchers: 5
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#### ⚠️ Update
Expo now supports [Release Channels](https://docs.expo.io/versions/latest/guides/release-channels.html)! This script was created before that feature existed. You probably want to use them instead.
# Expo Deploy
Bash script to deploy to different [Expo](https://expo.io) environments.
It switches the relevant json file to be `app.json` before running the correct commands.
## Setup
- `npm install exp -g`
- Place the deploy script in your root directory
- Add the relevant config files as shown in this example repository
- Add `/app.json` to your `.gitignore`.
## Usage
- **Publish:** `./deploy publish [environment]`
- **Build:** `./deploy build [environment]` (builds both IPA + APK files)
- **Development:** You'll want to copy the correct app file manually. E.g: `cp ./config/staging.json ./app.json && react-native-scripts start`. I haven't thought of a better way to do this yet.
### Local Exp
It's also possible to have [exp](https://github.com/expo/exp) installed locally. To do this:
- `npm install exp --save-dev`
- In your `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"
```
- Run with`ENVIRONMENT=staging npm run publish` or `ENVIRONMENT=staging npm run build`