Browse Source

update env scripts

Daniel Zlotin 7 years ago
parent
commit
f93fc240a4

+ 3
- 10
.travis.yml View File

3
 
3
 
4
 env:
4
 env:
5
   global:
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
     - YARN_CACHE=$HOME/.yarn-cache
6
     - YARN_CACHE=$HOME/.yarn-cache
11
     - CODE_SIGNING_REQUIRED=NO
7
     - CODE_SIGNING_REQUIRED=NO
12
     - RCT_NO_LAUNCH_PACKAGER=true
8
     - RCT_NO_LAUNCH_PACKAGER=true
23
 
19
 
24
 install:
20
 install:
25
         # node:
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
         # yarn:
23
         # yarn:
31
-  - curl -o- -L https://yarnpkg.com/install.sh | bash
24
+  - source ./scripts/env/installYarn.sh
32
   - yarn config set cache-folder $YARN_CACHE
25
   - yarn config set cache-folder $YARN_CACHE
33
         # android sdk:
26
         # android sdk:
34
-  - ./scripts/installAndroidSDK.sh
27
+  - source ./scripts/env/installAndroidSDK.sh
35
         # android emulator:
28
         # android emulator:
36
   #- echo yes | android update sdk --no-ui --all --filter "sys-img-armeabi-v7a-google_apis-25"
29
   #- echo yes | android update sdk --no-ui --all --filter "sys-img-armeabi-v7a-google_apis-25"
37
   #- echo no | android create avd --name AVD -t android-25 --abi google_apis/armeabi-v7a
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
-#!/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
 # fix for https://code.google.com/p/android/issues/detail?id=223424
6
 # fix for https://code.google.com/p/android/issues/detail?id=223424
4
 mkdir -p ~/.android
7
 mkdir -p ~/.android

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

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

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