File tree 2 files changed +16
-10
lines changed
2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ after_success:
24
24
- mkdir s3-publish
25
25
- cp nativescript*.tgz s3-publish/nativescript.tgz
26
26
before_deploy :
27
- - node .travis/add-publishConfig.js next
27
+ - node .travis/add-publishConfig.js
28
28
deploy :
29
29
- provider : s3
30
30
bucket : nativescript-ci
@@ -43,3 +43,10 @@ deploy:
43
43
branch : master
44
44
api_key :
45
45
secure : KzzsvF3eA3j4gRQa8tO//+XWNSR3XiX8Sa18o3PyKyG9/cBZ6PQ3Te74cNS1C3ZiLUOgs5dWA6/TmRVPci4XjvFaWo/B6e2fuVSl5H94Od99bkeBHJsbLSEkLN4ClV/YbGuyKgA5Q2yIFt6p2EJjL90RjbbIk7I4YuyG2Mo3j0Q=
46
+ - provider : npm
47
+ skip_cleanup : true
48
+
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 2
2
3
3
var fsModule = require ( 'fs' ) ;
4
4
5
- //Adds a publishConfig section to the package.json file
5
+ // Adds a publishConfig section to the package.json file
6
6
// and sets a tag to it
7
7
8
8
var path = './package.json' ;
9
9
var fileOptions = { encoding : "utf-8" } ;
10
10
var content = fsModule . readFileSync ( path , fileOptions ) ;
11
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
12
var packageDef = JSON . parse ( content ) ;
19
13
if ( ! packageDef . publishConfig ) {
20
14
packageDef . publishConfig = { } ;
21
15
}
22
- packageDef . publishConfig . tag = tag ;
16
+
17
+ if ( $TRAVIS_BRANCH === 'release' ) {
18
+ packageDef . publishConfig . tag = 'rc' ;
19
+ } else {
20
+ packageDef . publishConfig . tag = 'next' ;
21
+ }
23
22
24
23
var 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