Merge branch 'ErjanGavalji/publish-@next'

This commit is contained in:
Erjan Gavalji
2016-04-14 15:38:10 +03:00

View File

@ -1,69 +1,69 @@
env: env:
global: global:
- DATE=$(date +%Y-%m-%d) - DATE=$(date +%Y-%m-%d)
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER - PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
- PACKAGE_NAME=tns-core-modules - PACKAGE_NAME=tns-core-modules
- NODE_VERSION=5.10.1 - NODE_VERSION=5.10.1
- EMULATOR_API_VER=22 - EMULATOR_API_VER=22
- RUNTIMEVERSION=next - RUNTIMEVERSION=next
- AVD_NAME=Arm$EMULATOR_API_VER - AVD_NAME=Arm$EMULATOR_API_VER
addons: addons:
artifacts: artifacts:
paths: $HOME/test-run-results$PACKAGE_VERSION.xml paths:
- "$HOME/test-run-results$PACKAGE_VERSION.xml"
sudo: required sudo: required
dist: trusty dist: trusty
language: android language: android
node_js: node_js:
- 4.2.3 - 4.2.3
jdk: jdk:
- oraclejdk8 - oraclejdk8
android: android:
components: components:
- platform-tools - platform-tools
- tools - tools
- build-tools-23.0.3 - build-tools-23.0.3
- android-$EMULATOR_API_VER - android-$EMULATOR_API_VER
- android-23 - android-23
- extra-android-support - extra-android-support
- extra-android-m2repository - extra-android-m2repository
- sys-img-armeabi-v7a-android-$EMULATOR_API_VER - sys-img-armeabi-v7a-android-$EMULATOR_API_VER
before_script: before_script:
- nvm install $NODE_VERSION - nvm install $NODE_VERSION
- npm install -g grunt-cli - npm install -g grunt-cli
- npm install - npm install
- (cd build/platform-declarations && npm install) - "(cd build/platform-declarations && npm install)"
- echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER -b armeabi-v7a -c 12M - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER -b
- emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window & armeabi-v7a -c 12M
- android-wait-for-emulator - emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window &
- android-wait-for-emulator
script: script:
- jdk_switcher use oraclejdk8 - jdk_switcher use oraclejdk8
- grunt default && - grunt default &&
FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/modules/package.json").version);'` && FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/modules/package.json").version);'` &&
(cd build/platform-declarations && grunt) && (cd build/platform-declarations && grunt) &&
echo no | npm install nativescript -g > /dev/null && echo no | npm install nativescript -g > /dev/null &&
grunt buildOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false > /dev/null && grunt buildOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false > /dev/null &&
grunt runOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false grunt runOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false
- node ./build/travis-scripts/check-testrun-broken.js
- node ./build/travis-scripts/check-testrun-broken.js - adb pull /data/data/org.nativescript.TestsApp/files/test-results.xml &&
- adb pull /data/data/org.nativescript.TestsApp/files/test-results.xml && mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml
mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml
before_deploy: before_deploy:
- mv bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz ../.deploymentpackage - mv bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz ../.deploymentpackage
- mv .build ../ - mv build ../
- cd .. - cd ..
- rm -rf NativeScript - rm -rf NativeScript
- tar -zxvf .deploymentpackage - tar -zxvf .deploymentpackage
- mv package $PACKAGE_NAME - mv package $PACKAGE_NAME
- cd $PACKAGE_NAME - cd $PACKAGE_NAME
- rm ../.deploymentpackage - rm ../.deploymentpackage
- mv ../build ./ - mv ../build ./
- node ./build/travis-scripts/add-publishConfig.js next - node ./build/travis-scripts/add-publishConfig.js next
deploy: deploy:
provider: npm provider: npm
email: nativescript@telerik.com email: nativescript@telerik.com
on: on:
branch: master branch: master
skip_cleanup: true skip_cleanup: true
api_key: api_key:
secure: aFJZR8VIbFAlXfFx5G2AveSgpGjr40prghvw8m06X0yvmUQlucwHVyq+Ov0ZD94br8d7OUOPbUzh+p9N/+oXLAXOj3DbQmJaCc+fk/e+avHu1BRy3fg295P9BQau1Abu+2ZO7tUbg5zAqJqhbEgjXsr9B5gxl+vwh4lbDhCPCwo= secure: j2gE5jnGSuCFy7s3pDB6Or2j+vhlRYIlSSB1mDI7R5PvpV0kWr8yE1rLnyqeb0pI7WY/36SV/0NZCClJhlrZFvd7QvaP3+55cGX3ijmsDp8WxfQRyHppA9RZuMFujG7swFr/s0RmoYgO9mYNe46lJTX8m0HZeNN2qlAC7LDD3x8=