Skip to content

Commit 5a70d47

Browse files
author
Nedyalko Nikolov
committed
Added @next build functionality to travis.
1 parent 6eedca0 commit 5a70d47

File tree

3 files changed

+69
-25
lines changed

3 files changed

+69
-25
lines changed

.travis.yml

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,62 @@
1+
env:
2+
global:
3+
- NODE_VERSION=4.4.7
4+
15
language: android
26

37
jdk:
4-
- oraclejdk8
8+
- oraclejdk8
59

610
android:
711
components:
8-
- platform-tools
9-
- build-tools-23.0.1
10-
- android-23
11-
- extra-android-m2repository
12-
- sys-img-armeabi-v7a-android-19
12+
- platform-tools
13+
- build-tools-23.0.1
14+
- android-23
15+
- extra-android-m2repository
16+
- sys-img-armeabi-v7a-android-19
1317

1418
before_cache:
15-
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
19+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
1620

1721
cache:
18-
directories:
22+
directories:
1923
- .nvm
2024
- $HOME/.gradle/caches/
2125
- $HOME/.gradle/wrapper/
2226

2327
install:
24-
- nvm install 4
25-
- npm install -g typings
26-
- npm install -g nativescript --ignore-scripts
27-
- tns usage-reporting disable
28-
- tns error-reporting disable
29-
- cd nativescript-angular
30-
- npm install
31-
- cd ../tests
32-
- npm install ../nativescript-angular
33-
- npm install
28+
- nvm install $NODE_VERSION
29+
- npm install -g typings
30+
- npm install -g nativescript --ignore-scripts
31+
- tns usage-reporting disable
32+
- tns error-reporting disable
33+
- cd nativescript-angular
34+
- npm install
35+
- npm link
36+
- cd ../tests
37+
- npm link nativescript-angular
38+
- npm install
3439

3540
before_script:
36-
- echo no | android create avd --force -n test -t android-19 -b armeabi-v7a
37-
- emulator -avd test -no-audio -no-window &
38-
- android-wait-for-emulator
41+
- echo no | android create avd --force -n test -t android-19 -b armeabi-v7a
42+
- emulator -avd test -no-audio -no-window &
43+
- android-wait-for-emulator
3944

4045
script:
41-
- tns platform add android
42-
- tns test android --emulator --justlaunch
43-
- npm run appium-android
46+
- tns platform add android
47+
- tns test android --emulator --justlaunch
48+
- npm run appium-android
49+
50+
before_deploy:
51+
- cd ../nativescript-angular
52+
- node ../build/travis-scripts/add-publishConfig.js next
53+
54+
deploy:
55+
provider: npm
56+
email: nativescript@telerik.com
57+
api_key:
58+
secure: eUwpxI97BxbnWsszLLfQRpGmTOV7WlcuuepBx7JW0v0y0phPsKaWtiI5xcXYr8dvuys4VO+/BqA1+yyXkRLZJUjtJZEP2AVddG2LzC8AQ7hJxs5XtjelmsjX35xkT6PfEJ6M2vZiU7R7knJDrIuIsdRzngcaCY2KbdlHWckNO+QQxs2lFGRZR4DQBZE75nxmsBLOzpi3cPz5f0USrroquVJXi/HV9WEHHWYG9yAinQFJyKitBNwuvFiPTZXYJEKJ0ojG0JxpyVJ3htgplJSvoM32nrt8bFi2UOkRR3B3wo33qUvGYs9JT3aAZz7ZdCcXuW3QtlMeiHN5Sfdb4FXp1xLLupdo8BIC4gsVBYAQuEA/dGlgMxRulNtqeNe0rZnqmnxT/hCzpInWAZKremWGOAM2c7Oh0leGGRwsIOINUMmUiBe4vJiWF+Pmp2bRzNjDzlEmSFR3GFWBSfCihtQOUC0lM9y7jcXrzjl3Q57/crXpYVbasr8nbaMpltFUdx6iO0hg1Qg9MJAFvtkz/p+oOZqtPAA5rz1hZoXPu0iItJQBS4AxMrCHwwWotDoZBsEifh5AUJE81WrLdEyjXkiBwDxZeWbJDGujr4K9CJ2Q1cUW1iY8RZ7WzIg48gpEyECuxhIDUMFJWeKemlq7Qvv25Ks9cyD4TNlOoBlcqFjvMNE=
59+
on:
60+
branch: master
61+
skip_cleanup: true
62+
repo: NativeScript/nativescript-angular
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env node
2+
3+
var fsModule = require('fs');
4+
5+
//Adds a publishConfig section to the package.json file
6+
// and sets a tag to it
7+
8+
var path = './package.json';
9+
var fileOptions = {encoding: "utf-8"};
10+
var content = fsModule.readFileSync(path, fileOptions);
11+
12+
var tag = process.argv[2];
13+
if (!tag) {
14+
console.log('Please pass the tag name as an argument!');
15+
process.exit(1);
16+
}
17+
18+
var packageDef = JSON.parse(content);
19+
if (!packageDef.publishConfig) {
20+
packageDef.publishConfig = {};
21+
}
22+
packageDef.publishConfig.tag = tag;
23+
24+
var newContent = JSON.stringify(packageDef, null, ' ');
25+
fsModule.writeFileSync(path, newContent, fileOptions);

tests/app/tests/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("Http", () => {
2727
provide(Http, {
2828
useFactory: function (backend: ConnectionBackend, defaultOptions: BaseRequestOptions, nsFileSystem: NSFileSystem) {
2929
//HACK: cast backend to any to work around an angular typings problem
30-
return new NSHttp(<any>backend, defaultOptions, nsFileSystem);
30+
return new NSHttp(<any>backend, <any>defaultOptions, nsFileSystem);
3131
},
3232
deps: [MockBackend, BaseRequestOptions, NSFileSystem]
3333
})

0 commit comments

Comments
 (0)