Skip to content

Commit

Permalink
Simplify build.sh control flow (#1279)
Browse files Browse the repository at this point in the history
* Simplify this control flow a bit

* No need to mention watchman as it's actually handled by the Linux installing dependencies link
  • Loading branch information
rickycodes authored Jan 16, 2020
1 parent b131002 commit 11abb29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ The code is built using React-Native and running code locally requires a Mac or
- Before starting, you need to install React Native dependencies:
- [MacOs](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-1)
- [Linux](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-2)
- Now clone this repo and then install all our dependencies
- You'll also need to rename the `.*.env.example` files (remove the `.example`) in the root of the project and fill in the appropriate values for each key
- Now clone this repo and then install all our dependencies.

```bash
cd metamask-mobile
yarn install
```
- Rename the `.*.env.example` files (remove the `.example`) in the root of the project and fill in the appropriate values for each key.

- Running the app on Android:

You'll need the `secret-tool` (a part of [libsecret-tools](https://launchpad.net/ubuntu/bionic/+package/libsecret-tools) package on Debian/Ubuntu based distributions) and `watchman` binaries on your machine. You'll also want to have the android SDK; the easiest way to do that is by installing [Android Studio](https://developer.android.com/studio). Additionally, you'll need to install the Google Play Licencing Library via the SDK Manager in Android Studio.
You will need the `secret-tool` (a part of [libsecret-tools](https://launchpad.net/ubuntu/bionic/+package/libsecret-tools) package on Debian/Ubuntu based distributions) binary on your machine. You'll also want to have the android SDK; the easiest way to do that is by installing [Android Studio](https://developer.android.com/studio). Additionally, you'll need to install the Google Play Licencing Library via the SDK Manager in Android Studio.

```bash
yarn start:android
Expand Down
20 changes: 6 additions & 14 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,28 +235,20 @@ checkParameters "$@"
printTitle

if [ "$PLATFORM" == "ios" ]; then
if [ -f "$IOS_ENV_FILE" ]; then
# we don't care about env file in CI
if [ -f "$IOS_ENV_FILE" ] || [ "$CI" = true ]; then
buildIos
else
# we don't care about env file in CI
if [ "$CI" = "true" ]; then
buildIos
else
envFileMissing $IOS_ENV_FILE
fi
envFileMissing $IOS_ENV_FILE
fi



else
if [ -f "$ANDROID_ENV_FILE" ]; then
# we don't care about env file in CI
if [ -f "$ANDROID_ENV_FILE" ] || [ "$CI" = true ]; then
buildAndroid
else
# we don't care about env file in CI
if [ "$CI" = "true" ]; then
buildAndroid
else
envFileMissing $ANDROID_ENV_FILE
fi
envFileMissing $ANDROID_ENV_FILE
fi
fi

0 comments on commit 11abb29

Please sign in to comment.