From 23acc07809cd43886fccb8adffc982a3d0daa041 Mon Sep 17 00:00:00 2001 From: Erjan Gavalji Date: Thu, 14 Apr 2016 13:38:37 +0300 Subject: [PATCH] Fix the deployment to npm Update the API key Improve the formatting of the .travis file --- .travis.yml | 114 ++++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/.travis.yml b/.travis.yml index b8834d715..edd73e9d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,69 +1,69 @@ env: - global: - - DATE=$(date +%Y-%m-%d) - - PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER - - PACKAGE_NAME=tns-core-modules - - NODE_VERSION=5.10.1 - - EMULATOR_API_VER=22 - - RUNTIMEVERSION=next - - AVD_NAME=Arm$EMULATOR_API_VER + global: + - DATE=$(date +%Y-%m-%d) + - PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER + - PACKAGE_NAME=tns-core-modules + - NODE_VERSION=5.10.1 + - EMULATOR_API_VER=22 + - RUNTIMEVERSION=next + - AVD_NAME=Arm$EMULATOR_API_VER addons: - artifacts: - paths: $HOME/test-run-results$PACKAGE_VERSION.xml + artifacts: + paths: + - "$HOME/test-run-results$PACKAGE_VERSION.xml" sudo: required dist: trusty language: android node_js: - - 4.2.3 + - 4.2.3 jdk: - - oraclejdk8 + - oraclejdk8 android: - components: - - platform-tools - - tools - - build-tools-23.0.3 - - android-$EMULATOR_API_VER - - android-23 - - extra-android-support - - extra-android-m2repository - - sys-img-armeabi-v7a-android-$EMULATOR_API_VER - + components: + - platform-tools + - tools + - build-tools-23.0.3 + - android-$EMULATOR_API_VER + - android-23 + - extra-android-support + - extra-android-m2repository + - sys-img-armeabi-v7a-android-$EMULATOR_API_VER before_script: - - nvm install $NODE_VERSION - - npm install -g grunt-cli - - 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 - - emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window & - - android-wait-for-emulator + - nvm install $NODE_VERSION + - npm install -g grunt-cli + - 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 + - emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window & + - android-wait-for-emulator script: - - jdk_switcher use oraclejdk8 - - grunt default && - FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/modules/package.json").version);'` && - (cd build/platform-declarations && grunt) && - 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 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 - - adb pull /data/data/org.nativescript.TestsApp/files/test-results.xml && - mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml + - jdk_switcher use oraclejdk8 + - grunt default && + FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/modules/package.json").version);'` && + (cd build/platform-declarations && grunt) && + 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 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 + - adb pull /data/data/org.nativescript.TestsApp/files/test-results.xml && + mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml before_deploy: - - mv bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz ../.deploymentpackage - - mv .build ../ - - cd .. - - rm -rf NativeScript - - tar -zxvf .deploymentpackage - - mv package $PACKAGE_NAME - - cd $PACKAGE_NAME - - rm ../.deploymentpackage - - mv ../build ./ - - node ./build/travis-scripts/add-publishConfig.js next + - mv bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz ../.deploymentpackage + - mv build ../ + - cd .. + - rm -rf NativeScript + - tar -zxvf .deploymentpackage + - mv package $PACKAGE_NAME + - cd $PACKAGE_NAME + - rm ../.deploymentpackage + - mv ../build ./ + - node ./build/travis-scripts/add-publishConfig.js next deploy: - provider: npm - email: nativescript@telerik.com - on: - branch: master - skip_cleanup: true - api_key: - secure: aFJZR8VIbFAlXfFx5G2AveSgpGjr40prghvw8m06X0yvmUQlucwHVyq+Ov0ZD94br8d7OUOPbUzh+p9N/+oXLAXOj3DbQmJaCc+fk/e+avHu1BRy3fg295P9BQau1Abu+2ZO7tUbg5zAqJqhbEgjXsr9B5gxl+vwh4lbDhCPCwo= + provider: npm + email: nativescript@telerik.com + on: + branch: master + skip_cleanup: true + api_key: + secure: j2gE5jnGSuCFy7s3pDB6Or2j+vhlRYIlSSB1mDI7R5PvpV0kWr8yE1rLnyqeb0pI7WY/36SV/0NZCClJhlrZFvd7QvaP3+55cGX3ijmsDp8WxfQRyHppA9RZuMFujG7swFr/s0RmoYgO9mYNe46lJTX8m0HZeNN2qlAC7LDD3x8=