Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wallet] Add script to build sdk for env before running yarn dev #1312

Merged
merged 1 commit into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"