-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
36 lines (36 loc) · 1.76 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
language: objective-c
matrix:
include:
- osx_image: xcode7.3
- osx_image: xcode8
install:
- gem install cocoapods --pre
- brew install jq
- brew install gradle
before_script:
- wget https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
- tar xzf android-sdk_r24.4.1-linux.tgz
- export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
- echo "yes" | android update sdk --filter platform-tools,extra-google-m2repository,extra-android-m2repository,build-tools-26.0.2,android-23,android-24,android-25,android-26,extra-android-support --no-ui --all --force
- rm -rf ~/Library/Developer/Xcode/DerivedData
- npm install -g cordova
script:
- cordova create app
- cd app
- cordova platform add android
- cordova platform add ios
- cordova plugin add https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core.git
- cordova build android
# Publishing to NPM and Tagging to Git
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && [[ "${TRAVIS_JOB_NUMBER}" = *".1"* ]]; then
cd ~/Documents;
git clone https://ibm-bluemix-mobile-services:${GH_TOKEN}@github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core.git;
cd bms-clientsdk-cordova-plugin-core;
git remote rm origin;
git remote add origin https://ibm-bluemix-mobile-services:${GH_TOKEN}@github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core.git;
echo $token >> $HOME/.npmrc;
git tag $(jq '.version' package.json | tr -d '"');
git push origin --tags;
npm publish;
fi