Browse Source

update env scripts

Daniel Zlotin 7 years ago
parent
commit
f93fc240a4

+ 3
- 10
.travis.yml View File

@@ -3,10 +3,6 @@ osx_image: xcode8.3
3 3
 
4 4
 env:
5 5
   global:
6
-    - NODE_VERSION=stable
7
-    - PATH=$PATH:$HOME/.yarn/bin
8
-    - ANDROID_HOME=$HOME/android-sdk-macosx
9
-    - PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
10 6
     - YARN_CACHE=$HOME/.yarn-cache
11 7
     - CODE_SIGNING_REQUIRED=NO
12 8
     - RCT_NO_LAUNCH_PACKAGER=true
@@ -23,15 +19,12 @@ cache:
23 19
 
24 20
 install:
25 21
         # node:
26
-  - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
27
-  - export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
28
-  - nvm install $NODE_VERSION
29
-  - nvm use $NODE_VERSION
22
+  - source ./scripts/env/installNode.sh
30 23
         # yarn:
31
-  - curl -o- -L https://yarnpkg.com/install.sh | bash
24
+  - source ./scripts/env/installYarn.sh
32 25
   - yarn config set cache-folder $YARN_CACHE
33 26
         # android sdk:
34
-  - ./scripts/installAndroidSDK.sh
27
+  - source ./scripts/env/installAndroidSDK.sh
35 28
         # android emulator:
36 29
   #- echo yes | android update sdk --no-ui --all --filter "sys-img-armeabi-v7a-google_apis-25"
37 30
   #- echo no | android create avd --name AVD -t android-25 --abi google_apis/armeabi-v7a

scripts/android-sdk-licenses/android-sdk-license → scripts/env/android-sdk-licenses/android-sdk-license View File


scripts/installAndroidSDK.sh → scripts/env/installAndroidSDK.sh View File

@@ -1,4 +1,7 @@
1
-#!/bin/sh -e
1
+#!/bin/bash -e
2
+
3
+export ANDROID_HOME=$HOME/android-sdk-macosx
4
+export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
2 5
 
3 6
 # fix for https://code.google.com/p/android/issues/detail?id=223424
4 7
 mkdir -p ~/.android

+ 6
- 0
scripts/env/installNode.sh View File

@@ -0,0 +1,6 @@
1
+#!/bin/bash -e
2
+
3
+curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
4
+export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
5
+nvm install stable
6
+nvm use stable

+ 4
- 0
scripts/env/installYarn.sh View File

@@ -0,0 +1,4 @@
1
+#!/bin/bash -e
2
+
3
+export PATH=$PATH:$HOME/.yarn/bin
4
+curl -o- -L https://yarnpkg.com/install.sh | bash