@@ -42,6 +42,7 @@ const bowerRepo = configOptions.bowerRepo; // if it is not set, then there is no
42
42
const docsRoot = path . join ( repoRoot , ( configOptions . docsRoot || 'docs-built/' ) ) ;
43
43
const tmpDocsRepo = path . join ( repoRoot , ( configOptions . tmpDocsRepo || 'tmp-docs-repo' ) ) ;
44
44
const docsRepo = configOptions . docsRepo ; // if it is not set, then there is no docs/site repo
45
+ const docsBuild = npmjson . scripts && npmjson . scripts [ 'docs-build' ] ;
45
46
46
47
const githubToken = process . env . GITHUB_TOKEN ;
47
48
@@ -234,12 +235,18 @@ function release({ type, preid, npmTagName }) {
234
235
console . log ( 'Completed: ' . cyan + '"npm run test"' . green ) ;
235
236
236
237
// npm run build
237
- if ( npmjson . scripts . build && ! skipBuildStep ) {
238
- console . log ( 'Running: ' . cyan + 'build' . green ) ;
239
- runAndGitRevertOnError ( 'npm run build' ) ;
240
- console . log ( 'Completed: ' . cyan + 'build' . green ) ;
238
+ if ( argv . onlyDocs && docsBuild ) {
239
+ console . log ( 'Running: ' . cyan + 'docs- build' . green ) ;
240
+ runAndGitRevertOnError ( 'npm run docs- build' ) ;
241
+ console . log ( 'Completed: ' . cyan + 'docs- build' . green ) ;
241
242
} else {
242
- console . log ( 'Skipping "npm run build" step.' . yellow ) ;
243
+ if ( npmjson . scripts . build && ! skipBuildStep ) {
244
+ console . log ( 'Running: ' . cyan + 'build' . green ) ;
245
+ runAndGitRevertOnError ( 'npm run build' ) ;
246
+ console . log ( 'Completed: ' . cyan + 'build' . green ) ;
247
+ } else {
248
+ console . log ( 'Skipping "npm run build" step.' . yellow ) ;
249
+ }
243
250
}
244
251
245
252
const vVersion = `v${ newVersion } ` ;
0 commit comments