File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ after_success:
2424- mkdir s3-publish
2525- cp nativescript*.tgz s3-publish/nativescript.tgz
2626before_deploy :
27- - node .travis/add-publishConfig.js next
27+ - node .travis/add-publishConfig.js
2828deploy :
2929 - provider : s3
3030 bucket : nativescript-ci
@@ -43,3 +43,10 @@ deploy:
4343 branch : master
4444 api_key :
4545 secure : KzzsvF3eA3j4gRQa8tO//+XWNSR3XiX8Sa18o3PyKyG9/cBZ6PQ3Te74cNS1C3ZiLUOgs5dWA6/TmRVPci4XjvFaWo/B6e2fuVSl5H94Od99bkeBHJsbLSEkLN4ClV/YbGuyKgA5Q2yIFt6p2EJjL90RjbbIk7I4YuyG2Mo3j0Q=
46+ - provider : npm
47+ skip_cleanup : true
48+ email : nativescript@telerik.com
49+ on :
50+ branch : release
51+ api_key :
52+ secure : KzzsvF3eA3j4gRQa8tO//+XWNSR3XiX8Sa18o3PyKyG9/cBZ6PQ3Te74cNS1C3ZiLUOgs5dWA6/TmRVPci4XjvFaWo/B6e2fuVSl5H94Od99bkeBHJsbLSEkLN4ClV/YbGuyKgA5Q2yIFt6p2EJjL90RjbbIk7I4YuyG2Mo3j0Q=
Original file line number Diff line number Diff line change 22
33var fsModule = require ( 'fs' ) ;
44
5- //Adds a publishConfig section to the package.json file
5+ // Adds a publishConfig section to the package.json file
66// and sets a tag to it
77
88var path = './package.json' ;
99var fileOptions = { encoding : "utf-8" } ;
1010var content = fsModule . readFileSync ( path , fileOptions ) ;
1111
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-
1812var packageDef = JSON . parse ( content ) ;
1913if ( ! packageDef . publishConfig ) {
2014 packageDef . publishConfig = { } ;
2115}
22- packageDef . publishConfig . tag = tag ;
16+
17+ if ( $TRAVIS_BRANCH === 'release' ) {
18+ packageDef . publishConfig . tag = 'rc' ;
19+ } else {
20+ packageDef . publishConfig . tag = 'next' ;
21+ }
2322
2423var newContent = JSON . stringify ( packageDef , null , ' ' ) ;
25- fsModule . writeFileSync ( path , newContent , fileOptions ) ;
24+ fsModule . writeFileSync ( path , newContent , fileOptions ) ;
You can’t perform that action at this time.
0 commit comments