Skip to content

Commit 7f42a69

Browse files
authored
Merge pull request #2000 from NativeScript/raikov/next
Added support for @next in nativescript-cli
2 parents 3afa813 + c1e5ea6 commit 7f42a69

File tree

4 files changed

+47
-21
lines changed

4 files changed

+47
-21
lines changed

.travis.yml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1+
env:
2+
global:
3+
- DATE=$(date +%Y-%m-%d)
4+
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
5+
- NATIVESCRIPT_SKIP_POSTINSTALL_TASKS=1
16
language: node_js
27
node_js:
38
- '4'
4-
before_install:
9+
git:
10+
submodules: false
11+
before_script:
512
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
613
- git submodule update --init --recursive
7-
- npm install -g grunt-cli
8-
install:
14+
- npm install grunt
15+
- node_modules/.bin/grunt enableScripts:false
916
- npm install
10-
- grunt pack --no-color
11-
script:
1217
- npm test
13-
git:
14-
submodules: false
18+
- node_modules/.bin/grunt enableScripts:true
19+
script:
20+
- node_modules/.bin/grunt lint
21+
- node_modules/.bin/grunt pack --no-color
22+
before_deploy:
23+
- node .travis/add-publishConfig.js next
1524
deploy:
16-
- provider: releases
1725
skip_cleanup: true
18-
api_key:
19-
secure: eUmm52zfs68StxqUkPWuuNa85vBrlYmjuRw4FR8kZSyBWKkCySU8xuZVRpxLdqE3VRAsORsP2Ggf4UKqDM4BtTNl0lZGLeyT2OuL/9AB1r/IqzylLI2xAmibboLktFL4BQL8uqWnBkyYHSC0Ufv7C8poXdbyubLrSMuP9hRBy/0=
20-
file: travis/nativescript.tgz
21-
on:
22-
tags: true
23-
all_branches: true
24-
- provider: npm
26+
provider: npm
2527
26-
api_key:
27-
secure: KISJen/tS+355itLT6eI5rBAwL9utOLDT1l8z6dJKLdt24l9LvKxhHlYI/WOCVPvNCUQ8cQAqGcVgmD+SmTpoCkBAHMml3C/zGZSwYd6Km1/1Eu0JtodbtLjLaTaPYpU+I7Z2bC6eFdb8hIrFEZhf92oQAyLCgBQJpu3ECjxXgI=
2828
on:
29-
tags: true
30-
all_branches: true
29+
branch: master
30+
api_key:
31+
secure: Ugq6m/y4P5gF15zffYzTKhusn1Csu3ymYLdD+yXgyK3hek9Ms5PKTz4MKgPinlViRCBoQV2fGh0JsCikawIpmQyD+M+FRDKlP2GcXPhFmSN1wVEloxTCwe7H6m7Kl9mo+MJOTS0BN7waCc6yTJBJPxo5nwFgz+DT2srIYndA2h4=

.travis/add-publishConfig.js

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);

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function shallowCopy(obj) {
99
}
1010

1111
var travis = process.env["TRAVIS"];
12-
var buildNumber = process.env["TRAVIS_BUILD_NUMBER"] || process.env["BUILD_NUMBER"] || "non-ci";
12+
var buildNumber = process.env["PACKAGE_VERSION"] || process.env["BUILD_NUMBER"] || "non-ci";
1313

1414
module.exports = function(grunt) {
1515
var path = require("path");

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@
102102
"engines": {
103103
"node": ">=0.10.40 <0.11.0 || >=0.12.7 <0.13.0 || >=4.2.1 <5.0.0 || >=5.1.0 <7.0.0"
104104
}
105-
}
105+
}

0 commit comments

Comments
 (0)