@@ -11,6 +11,12 @@ import Request from './request.js';
11
11
import Session from './session.js' ;
12
12
import { existsSync } from 'node:fs' ;
13
13
14
+ const dryRunMessage = 'You are running in dry-run mode, meaning NCU will not run ' +
15
+ 'the `git push` commands, you would need to copy-paste the ' +
16
+ 'following command in another terminal window. Alternatively, ' +
17
+ 'pass `--run` flag to ask NCU to run the command for you ' +
18
+ '(might not work if you need to type a passphrase to push to the remote).' ;
19
+
14
20
export default class ReleasePromotion extends Session {
15
21
constructor ( argv , cli , dir ) {
16
22
super ( cli , dir , argv . prid ) ;
@@ -372,6 +378,7 @@ export default class ReleasePromotion extends Session {
372
378
373
379
let prompt = 'Merge proposal branch into staging branch?' ;
374
380
if ( dryRun ) {
381
+ cli . info ( dryRunMessage ) ;
375
382
cli . info ( 'Run the following commands to merge the staging branch:' ) ;
376
383
cli . info ( `git push ${ this . upstream } HEAD:refs/heads/${ releaseBranch
377
384
} HEAD:refs/heads/${ stagingBranch } `) ;
@@ -400,6 +407,7 @@ export default class ReleasePromotion extends Session {
400
407
401
408
let prompt = `Push release tag and ${ this . branch } to ${ this . upstream } ?` ;
402
409
if ( dryRun ) {
410
+ cli . info ( dryRunMessage ) ;
403
411
cli . info ( 'Run the following commands to push to remote:' ) ;
404
412
cli . info ( `git push ${ this . upstream } ${ this . branch } ${ tagVersion } ` ) ;
405
413
prompt = 'Ready to continue?' ;
@@ -424,6 +432,7 @@ export default class ReleasePromotion extends Session {
424
432
let prompt = 'Promote and sign release builds?' ;
425
433
426
434
if ( dryRun ) {
435
+ cli . info ( dryRunMessage ) ;
427
436
cli . info ( 'Run the following command to sign and promote the release:' ) ;
428
437
cli . info ( './tools/release.sh -i <keyPath>' ) ;
429
438
prompt = 'Ready to continue?' ;
0 commit comments