Skip to content

Commit 23acc07

Browse files
committed
Fix the deployment to npm
Update the API key Improve the formatting of the .travis file
1 parent d88e675 commit 23acc07

File tree

1 file changed

+57
-57
lines changed

1 file changed

+57
-57
lines changed

.travis.yml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
11
env:
2-
global:
3-
- DATE=$(date +%Y-%m-%d)
4-
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
5-
- PACKAGE_NAME=tns-core-modules
6-
- NODE_VERSION=5.10.1
7-
- EMULATOR_API_VER=22
8-
- RUNTIMEVERSION=next
9-
- AVD_NAME=Arm$EMULATOR_API_VER
2+
global:
3+
- DATE=$(date +%Y-%m-%d)
4+
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
5+
- PACKAGE_NAME=tns-core-modules
6+
- NODE_VERSION=5.10.1
7+
- EMULATOR_API_VER=22
8+
- RUNTIMEVERSION=next
9+
- AVD_NAME=Arm$EMULATOR_API_VER
1010
addons:
11-
artifacts:
12-
paths: $HOME/test-run-results$PACKAGE_VERSION.xml
11+
artifacts:
12+
paths:
13+
- "$HOME/test-run-results$PACKAGE_VERSION.xml"
1314
sudo: required
1415
dist: trusty
1516
language: android
1617
node_js:
17-
- 4.2.3
18+
- 4.2.3
1819
jdk:
19-
- oraclejdk8
20+
- oraclejdk8
2021
android:
21-
components:
22-
- platform-tools
23-
- tools
24-
- build-tools-23.0.3
25-
- android-$EMULATOR_API_VER
26-
- android-23
27-
- extra-android-support
28-
- extra-android-m2repository
29-
- sys-img-armeabi-v7a-android-$EMULATOR_API_VER
30-
22+
components:
23+
- platform-tools
24+
- tools
25+
- build-tools-23.0.3
26+
- android-$EMULATOR_API_VER
27+
- android-23
28+
- extra-android-support
29+
- extra-android-m2repository
30+
- sys-img-armeabi-v7a-android-$EMULATOR_API_VER
3131
before_script:
32-
- nvm install $NODE_VERSION
33-
- npm install -g grunt-cli
34-
- npm install
35-
- (cd build/platform-declarations && npm install)
36-
- echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER -b armeabi-v7a -c 12M
37-
- emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window &
38-
- android-wait-for-emulator
32+
- nvm install $NODE_VERSION
33+
- npm install -g grunt-cli
34+
- npm install
35+
- "(cd build/platform-declarations && npm install)"
36+
- echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER -b
37+
armeabi-v7a -c 12M
38+
- emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window &
39+
- android-wait-for-emulator
3940
script:
40-
- jdk_switcher use oraclejdk8
41-
- grunt default &&
42-
FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/modules/package.json").version);'` &&
43-
(cd build/platform-declarations && grunt) &&
44-
echo no | npm install nativescript -g > /dev/null &&
45-
grunt buildOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false > /dev/null &&
46-
grunt runOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false
47-
48-
- node ./build/travis-scripts/check-testrun-broken.js
49-
- adb pull /data/data/org.nativescript.TestsApp/files/test-results.xml &&
50-
mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml
41+
- jdk_switcher use oraclejdk8
42+
- grunt default &&
43+
FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/modules/package.json").version);'` &&
44+
(cd build/platform-declarations && grunt) &&
45+
echo no | npm install nativescript -g > /dev/null &&
46+
grunt buildOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false > /dev/null &&
47+
grunt runOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false
48+
- node ./build/travis-scripts/check-testrun-broken.js
49+
- adb pull /data/data/org.nativescript.TestsApp/files/test-results.xml &&
50+
mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml
5151
before_deploy:
52-
- mv bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz ../.deploymentpackage
53-
- mv .build ../
54-
- cd ..
55-
- rm -rf NativeScript
56-
- tar -zxvf .deploymentpackage
57-
- mv package $PACKAGE_NAME
58-
- cd $PACKAGE_NAME
59-
- rm ../.deploymentpackage
60-
- mv ../build ./
61-
- node ./build/travis-scripts/add-publishConfig.js next
52+
- mv bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz ../.deploymentpackage
53+
- mv build ../
54+
- cd ..
55+
- rm -rf NativeScript
56+
- tar -zxvf .deploymentpackage
57+
- mv package $PACKAGE_NAME
58+
- cd $PACKAGE_NAME
59+
- rm ../.deploymentpackage
60+
- mv ../build ./
61+
- node ./build/travis-scripts/add-publishConfig.js next
6262
deploy:
63-
provider: npm
64-
email: nativescript@telerik.com
65-
on:
66-
branch: master
67-
skip_cleanup: true
68-
api_key:
69-
secure: aFJZR8VIbFAlXfFx5G2AveSgpGjr40prghvw8m06X0yvmUQlucwHVyq+Ov0ZD94br8d7OUOPbUzh+p9N/+oXLAXOj3DbQmJaCc+fk/e+avHu1BRy3fg295P9BQau1Abu+2ZO7tUbg5zAqJqhbEgjXsr9B5gxl+vwh4lbDhCPCwo=
63+
provider: npm
64+
email: nativescript@telerik.com
65+
on:
66+
branch: master
67+
skip_cleanup: true
68+
api_key:
69+
secure: j2gE5jnGSuCFy7s3pDB6Or2j+vhlRYIlSSB1mDI7R5PvpV0kWr8yE1rLnyqeb0pI7WY/36SV/0NZCClJhlrZFvd7QvaP3+55cGX3ijmsDp8WxfQRyHppA9RZuMFujG7swFr/s0RmoYgO9mYNe46lJTX8m0HZeNN2qlAC7LDD3x8=

0 commit comments

Comments
 (0)