File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const packagePath = path.join(repoRoot, 'package.json');
17
17
const changelog = path . join ( repoRoot , 'CHANGELOG.md' ) ;
18
18
19
19
const npmjson = JSON . parse ( cat ( packagePath ) ) ;
20
+ const isPrivate = npmjson . private ;
20
21
21
22
//------------------------------------------------------------------------------
22
23
// check if one of 'rf-changelog' or 'mt-changelog' is used by project
@@ -195,12 +196,18 @@ function release({ type, preid }) {
195
196
console . log ( 'Tagged: ' . cyan + vVersion . green ) ;
196
197
197
198
// npm
198
- console . log ( 'Releasing: ' . cyan + 'npm package' . green ) ;
199
- safeRun ( 'npm publish' ) ;
200
- console . log ( 'Released: ' . cyan + 'npm package' . green ) ;
199
+ if ( isPrivate ) {
200
+ console . log ( 'Package is private, skipping npm release' . yellow ) ;
201
+ } else {
202
+ console . log ( 'Releasing: ' . cyan + 'npm package' . green ) ;
203
+ safeRun ( 'npm publish' ) ;
204
+ console . log ( 'Released: ' . cyan + 'npm package' . green ) ;
205
+ }
201
206
202
207
// bower
203
- if ( bowerRepo ) {
208
+ if ( isPrivate ) {
209
+ console . log ( 'Package is private, skipping bower release' . yellow ) ;
210
+ } else if ( bowerRepo ) {
204
211
console . log ( 'Releasing: ' . cyan + 'bower package' . green ) ;
205
212
rm ( '-rf' , tmpBowerRepo ) ;
206
213
run ( `git clone ${ bowerRepo } ${ tmpBowerRepo } ` ) ;
You can’t perform that action at this time.
0 commit comments