Skip to content

Commit

Permalink
[Wallet] Add script to build sdk for env before running yarn dev (#1312)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrossy authored and ashishb committed Oct 11, 2019
1 parent 3e4b186 commit 2cb725c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"build:ts": "tsc --noEmit",
"build:metro": "echo 'NOT WORKING RIGHT NOW'",
"build:gen-graphql-types": "gql-gen --schema http://localhost:8080/graphql --template graphql-codegen-typescript-template --out ./typings/ 'src/**/*.tsx'",
"predev": "./scripts/pre-dev.sh",
"dev": "react-native run-android --appIdSuffix \"debug\"",
"dev:show-menu": "adb devices | grep '\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} adb -s {} shell input keyevent 82",
"dev:clear-data": "adb shell pm clear org.celo.mobile.debug",
Expand Down
12 changes: 12 additions & 0 deletions packages/mobile/scripts/pre-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail

# ====================================
# Tasks to run before running yarn dev
# ====================================

# Detect network from .env and build the sdk for it
export $(grep -v '^#' .env | xargs)
echo "Building sdk for testnet $DEFAULT_TESTNET"
yarn build:sdk $DEFAULT_TESTNET
echo "Done building sdk"

0 comments on commit 2cb725c

Please sign in to comment.