Skip to content

Commit

Permalink
Revert "Improve onboarding (#1276)"
Browse files Browse the repository at this point in the history
This reverts commit c6cc8e6.
  • Loading branch information
Bruno Barbieri authored Jan 16, 2020
1 parent c6cc8e6 commit de117ff
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 45 deletions.
5 changes: 0 additions & 5 deletions .android.env.example

This file was deleted.

5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ 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
Expand All @@ -29,8 +28,6 @@ yarn install

- 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.

```bash
yarn start:android
```
Expand Down
57 changes: 21 additions & 36 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ MODE=$2
TARGET=$3
RUN_DEVICE=false
PRE_RELEASE=false
JS_ENV_FILE=".js.env"
ANDROID_ENV_FILE=".android.env"
IOS_ENV_FILE=".ios.env"

envFileMissing() {
FILE="$1"
echo "'$FILE' is missing, you'll need to add it to the root of the project."
echo "For convenience you can rename '$FILE.example' and fill in the parameters."
}

displayHelp() {
echo ''
Expand Down Expand Up @@ -106,9 +97,9 @@ prebuild(){
./node_modules/.bin/concat-cli -f app/core/InpageBridge.js node_modules/web3/dist/web3.min.js app/util/setProvider.js -o app/core/InpageBridgeWeb3.js
# Load JS specific env variables
if [ "$PRE_RELEASE" = false ] ; then
if [ -e $JS_ENV_FILE ]
if [ -e .js.env ]
then
source $JS_ENV_FILE
source .js.env
fi
fi
}
Expand All @@ -133,9 +124,9 @@ prebuild_android(){
# Copy fonts with iconset
yes | cp -rf ./app/fonts/Metamask.ttf ./android/app/src/main/assets/fonts/Metamask.ttf
if [ "$PRE_RELEASE" = false ] ; then
if [ -e $ANDROID_ENV_FILE ]
if [ -e .android.env ]
then
source $ANDROID_ENV_FILE
source .android.env
fi
fi
}
Expand All @@ -162,15 +153,15 @@ buildIosRelease(){
# Replace release.xcconfig with ENV vars
if [ "$PRE_RELEASE" = true ] ; then
echo "Setting up env vars...";
echo "$IOS_ENV" | tr "|" "\n" > $IOS_ENV_FILE
echo $IOS_ENV | tr "|" "\n" > .ios.env
echo "Build started..."
brew install watchman
cd ios && bundle install && bundle exec fastlane prerelease
# Generate sourcemaps
yarn sourcemaps:ios
else
if [ ! -f "ios/release.xcconfig" ] ; then
echo "$IOS_ENV" | tr "|" "\n" > ios/release.xcconfig
echo $IOS_ENV | tr "|" "\n" > ios/release.xcconfig
fi
./node_modules/.bin/react-native run-ios --configuration Release --simulator "iPhone 11 Pro (13.2)"
fi
Expand All @@ -186,7 +177,7 @@ buildAndroidRelease(){
TARGET="android/app/build.gradle"
sed -i'' -e 's/getPassword("mm","mm-upload-key")/"ANDROID_KEY"/' $TARGET;
sed -i'' -e "s/ANDROID_KEY/$ANDROID_KEY/" $TARGET;
echo "$ANDROID_KEYSTORE" | base64 --decode > android/keystores/release.keystore
echo $ANDROID_KEYSTORE | base64 --decode > android/keystores/release.keystore
fi

# GENERATE APK
Expand All @@ -212,31 +203,25 @@ checkParameters "$@"

printTitle

if [ "$PLATFORM" == "ios" ]; then
if [ -f "$IOS_ENV_FILE" ]; then
if [ "$MODE" == "release" ] ; then
buildIosRelease
else
if [ "$RUN_DEVICE" = true ] ; then
buildIosDevice
else
buildIosSimulator
fi
if [ "$PLATFORM" == "ios" ]
then

if [ "$MODE" == "release" ] ; then
buildIosRelease
else
if [ "$RUN_DEVICE" = true ] ; then
buildIosDevice
else
buildIosSimulator
fi
else
envFileMissing $IOS_ENV_FILE
fi



else
if [ -f "$ANDROID_ENV_FILE" ]; then
if [ "$MODE" == "release" ] ; then
buildAndroidRelease
else
buildAndroid
fi
else
envFileMissing $ANDROID_ENV_FILE
if [ "$MODE" == "release" ] ; then
buildAndroidRelease
else
buildAndroid
fi
fi

0 comments on commit de117ff

Please sign in to comment.