@@ -105,17 +105,6 @@ const yargsConf = yargs
105
105
106
106
const argv = yargsConf . argv ;
107
107
108
- let dryRunMode = argv . dryRun || defaultDryRun ;
109
- if ( argv . run ) {
110
- dryRunMode = false ;
111
- }
112
- if ( dryRunMode ) {
113
- console . log ( 'DRY RUN' . magenta ) ;
114
- if ( defaultDryRun ) console . log ( 'For actual running of your command please add "--run" option' . yellow ) ;
115
- }
116
-
117
- if ( argv . onlyDocs ) console . log ( 'Publish only documents' . magenta ) ;
118
-
119
108
config . silent = ! argv . verbose ;
120
109
121
110
const versionBumpOptions = {
@@ -125,13 +114,25 @@ const versionBumpOptions = {
125
114
} ;
126
115
127
116
if ( versionBumpOptions . type === undefined && versionBumpOptions . preid === undefined ) {
128
- console . log ( 'Must provide either a version bump type, preid ( or both) ' . red ) ;
117
+ console . log ( 'Must provide either a version bump type, " preid" or "--only-docs" ' . red ) ;
129
118
console . log ( yargsConf . help ( ) ) ;
130
119
exit ( 1 ) ;
131
120
}
132
121
133
122
let notesForRelease = argv . notes ;
134
123
124
+ let dryRunMode = argv . dryRun || defaultDryRun ;
125
+ if ( argv . run ) {
126
+ dryRunMode = false ;
127
+ }
128
+ if ( dryRunMode ) {
129
+ console . log ( 'DRY RUN' . magenta ) ;
130
+ if ( defaultDryRun ) console . log ( 'For actual running of your command please add "--run" option' . yellow ) ;
131
+ }
132
+
133
+ if ( argv . preid ) console . log ( '"--preid" detected. Documents will not be published' . yellow ) ;
134
+ if ( argv . onlyDocs && ! argv . preid ) console . log ( 'Publish only documents' . yellow ) ;
135
+
135
136
136
137
//------------------------------------------------------------------------------
137
138
// functions
@@ -395,7 +396,7 @@ function release({ type, preid, npmTagName }) {
395
396
}
396
397
397
398
// documents site
398
- if ( ! isPrivate && docsRepo ) {
399
+ if ( ! isPrivate && ! preid && docsRepo ) {
399
400
console . log ( 'Releasing: ' . cyan + 'documents site' . green ) ;
400
401
releaseAdRepo ( docsRepo , docsRoot , tmpDocsRepo , vVersion ) ;
401
402
console . log ( 'Documents site has been released' . green ) ;
0 commit comments