@@ -64,6 +64,7 @@ ${chalk.dim('$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_tok
6464 hub : flagsBuilder . hub ( ) ,
6565 interactive : flagsBuilder . interactive ( ) ,
6666 overlay : flagsBuilder . overlay ( ) ,
67+ preview : flagsBuilder . preview ( ) ,
6768 token : flagsBuilder . token ( ) ,
6869 }
6970
@@ -147,6 +148,7 @@ ${chalk.dim('$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_tok
147148 documentationName : string | undefined ,
148149 branch : string | undefined ,
149150 overlay ?: string [ ] | undefined ,
151+ temporary ?: boolean | undefined ,
150152 ) : Promise < void > {
151153 ux . action . status = `...a new version to your ${ documentation } documentation`
152154
@@ -160,13 +162,16 @@ ${chalk.dim('$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_tok
160162 documentationName ,
161163 branch ,
162164 overlay ,
165+ temporary ,
163166 )
164167
165168 if ( dryRun ) {
166169 ux . stdout ( ux . colorize ( 'green' , 'Definition is valid' ) )
167170 } else if ( response ) {
168171 process . stdout . write ( ux . colorize ( 'green' , `Your ${ documentation } documentation...` ) )
169- ux . stdout ( ux . colorize ( 'green' , `has received a new deployment which will soon be ready at:` ) )
172+ ux . stdout (
173+ ux . colorize ( 'green' , `has received a new ${ temporary ? 'preview' : 'deployment' } which will soon be ready at:` ) ,
174+ )
170175 ux . stdout ( ux . colorize ( 'underline' , response . doc_public_url ! ) )
171176 } else {
172177 ux . warn ( `Your ${ documentation } documentation has not changed` )
@@ -193,6 +198,7 @@ ${chalk.dim('$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_tok
193198 documentationName ,
194199 branch ,
195200 overlay ,
201+ temporary ,
196202 ] = [
197203 flags [ 'dry-run' ] ,
198204 flags . doc ,
@@ -208,9 +214,11 @@ ${chalk.dim('$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_tok
208214 flags [ 'doc-name' ] ,
209215 flags . branch ,
210216 flags . overlay ,
217+ /* when --preview is provided, generate temporary version */
218+ flags . preview ,
211219 ]
212220
213- const action = dryRun ? 'validate' : 'deploy'
221+ const action = dryRun ? 'validate' : temporary ? 'preview' : 'deploy'
214222 ux . action . start ( `Let's ${ action } on Bump.sh` )
215223
216224 if ( isDir ( args . file ) ) {
@@ -243,6 +251,7 @@ ${chalk.dim('$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_tok
243251 documentationName ,
244252 branch ,
245253 overlay ,
254+ temporary ,
246255 )
247256 } else {
248257 throw new CLIError ( 'Missing required flag --doc=<slug>' )
0 commit comments