Unverified Commit 8b540ab2 authored by Thibaut Sardan's avatar Thibaut Sardan Committed by GitHub

fix: scripts for android and related doc (#708)

* fix scripts and doc

* change for install:ios instead

* Update docs/wiki/Building-And-Publishing.md
Co-authored-by: Denis_P's avatarDenis Pisarev <denis.pisarev@parity.io>

* Update docs/wiki/Building-And-Publishing.md

* swap and try something for detox e2e tests

* remove husky annoyingly slowing down pushes
Co-authored-by: Denis_P's avatarDenis Pisarev <denis.pisarev@parity.io>
parent 2e747df7
yarn-error.log
*.log
# typescript output directory
dist/
......
......@@ -6,7 +6,7 @@ In this page we will list the steps to publish the app on iOS App Store / Androi
##### Build production version
1. Switch to the `master` branch and run `yarn build`
1. Switch to the `master` branch and install the dependencies with `yarn install:ios`
3. Build the JS bundle with `yarn build-prod:ios`
4. Start the react-native server with `yarn start`
5. Build the project in Xcode, with `Generic iOS Device` selected on the top left
......
......@@ -15,23 +15,31 @@
- `$JAVA_HOME` envarionment variable set to java home directory (eg. `/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home`)
- `$ANDROID_HOME` environment variable set to Android SDK directory (eg. `/home/your_username/Android/Sdk`)*.
\* It's recommended to install **Android Studio** and use that to install the necessary build tools and SDKs for the Android version you want to test on. It's also the best way to test in the emulator.
\* It's recommended to install **Android Studio** and use that to install the necessary build tools and SDKs for the Android version you want to test on. It's also the best way to test in the emulator.
### Setup
#### iOS
- Install Dependencies
```
yarn install:ios
```
#### Android
- Install Dependencies
```
yarn build
```
yarn install
```
#### Any system
- Generate an Android Debug Key if it is first time.
```
./scripts/gen_key.sh
```
### Develop
### Develop
- Start React Native server
......@@ -40,7 +48,7 @@
```
Then:
- iOS
```
......
......@@ -27,7 +27,7 @@ Corresponding data:
### Unit Test
If dependencies are not installed please first run yarn build.
If dependencies are not installed please first run `yarn install:ios` or `yarn install` for android.
Run `yarn unit` for all the units test.
......@@ -51,7 +51,7 @@ yarn global add detox-cli
#### Complete Test
If dependencies are not installed please first run `yarn build`.
If dependencies are not installed please first run `yarn install:ios` or `yarn install` for android.
1. run react native server with `yarn start`
......
......@@ -10,12 +10,14 @@
"scripts": {
"android": "npx react-native run-android",
"build-prod:ios": "NODE_OPTIONS=--max_old_space_size=8192 npx react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios --assets-dest='./ios'",
"build": "yarn install && npx pod-install",
"install:ios": "yarn install && npx pod-install",
"xcbuild:debug": "xcodebuild -workspace ios/NativeSigner.xcworkspace -scheme NativeSigner -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build/NativeSigner",
"xcbuild:release": "xcodebuild -workspace ios/NativeSigner.xcworkspace -scheme NativeSigner -configuration Release -sdk iphonesimulator -derivedDataPath ios/build/NativeSigner -UseModernBuildSystem=YES | xcpretty -t && exit ${PIPESTATUS[0]}",
"xcbuild:githubActions": "xcodebuild -workspace ios/NativeSigner.xcworkspace -scheme NativeSigner -configuration GithubActions -sdk iphonesimulator -derivedDataPath ios/build/NativeSigner -UseModernBuildSystem=YES | xcpretty -t && exit ${PIPESTATUS[0]}",
"archive": "xcodebuild -scheme NativeSigner -workspace ios/NativeSigner.xcworkspace -configuration Release clean archive -archivePath \"ios/build/NativeSigner.xcarchive\" \n CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO",
"clean": "watchman watch-del-all && rm -rf /tmp/metro-bundler-cache-* && rm -rf /tmp/haste-map-react-native-packager-* && rm -rf node_modules/ && yarn cache clean --force && rm -rf ./android/app/build && rm -rf ./ios/build && (cd ios && pod deintegrate)",
"clean": "watchman watch-del-all && rm -rf /tmp/metro-bundler-cache-* && rm -rf /tmp/haste-map-react-native-packager-* && rm -rf node_modules/ && yarn cache clean --force",
"clean:android": "yarn clean && rm -rf ./android/app/build",
"clean:ios": "yarn clean && rm -rf ./ios/build && (cd ios && pod deintegrate)",
"commit": "commit-wizard",
"ios": "npx react-native run-ios",
"lint": "npx eslint . --ext .js,.jsx,.ts,.tsx --ignore-path .gitignore",
......@@ -33,11 +35,6 @@
"e2e:ios": "yarn run build-e2e:ios && yarn run test-e2e:ios",
"e2e": "yarn e2e:ios && yarn e2e:android"
},
"husky": {
"hooks": {
"pre-push": "yarn run lint"
}
},
"dependencies": {
"@polkadot/api": "1.26.1",
"@polkadot/reactnative-identicon": "0.53.1",
......@@ -99,7 +96,6 @@
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react-hooks": "^3.0.0",
"husky": "^3.0.8",
"jest": "^25.4.0",
"jetifier": "^1.6.5",
"metro-react-native-babel-preset": "^0.59.0",
......@@ -129,7 +125,6 @@
"build": "yarn xcbuild:githubActions",
"type": "ios.simulator",
"device": {
"os": "iOS 13.7",
"type": "iPhone 8"
}
},
......
......@@ -2906,7 +2906,7 @@ core-util-is@1.0.2, core-util-is@~1.0.0:
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
cosmiconfig@^5.0.5, cosmiconfig@^5.1.0, cosmiconfig@^5.2.1:
cosmiconfig@^5.0.5, cosmiconfig@^5.1.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a"
integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==
......@@ -4222,11 +4222,6 @@ get-stdin@^6.0.0:
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==
get-stdin@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6"
integrity sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==
get-stream@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
......@@ -4488,23 +4483,6 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
husky@^3.0.8:
version "3.1.0"
resolved "https://registry.yarnpkg.com/husky/-/husky-3.1.0.tgz#5faad520ab860582ed94f0c1a77f0f04c90b57c0"
integrity sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ==
dependencies:
chalk "^2.4.2"
ci-info "^2.0.0"
cosmiconfig "^5.2.1"
execa "^1.0.0"
get-stdin "^7.0.0"
opencollective-postinstall "^2.0.2"
pkg-dir "^4.2.0"
please-upgrade-node "^3.2.0"
read-pkg "^5.2.0"
run-node "^1.0.0"
slash "^3.0.0"
iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
......@@ -6563,7 +6541,7 @@ open@^6.2.0:
dependencies:
is-wsl "^1.1.0"
opencollective-postinstall@^2.0.0, opencollective-postinstall@^2.0.2:
opencollective-postinstall@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
......@@ -6868,13 +6846,6 @@ pkg-up@^3.1.0:
dependencies:
find-up "^3.0.0"
please-upgrade-node@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942"
integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==
dependencies:
semver-compare "^1.0.0"
plist@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c"
......@@ -7696,11 +7667,6 @@ run-async@^2.2.0, run-async@^2.4.0:
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
run-node@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e"
integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==
rx-lite-aggregates@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be"
......@@ -7809,11 +7775,6 @@ scryptsy@^2.1.0:
resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-2.1.0.tgz#8d1e8d0c025b58fdd25b6fa9a0dc905ee8faa790"
integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==
semver-compare@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment