Skip to content

Commit 4e45c8b

Browse files
committed
Add a more verbose --dry-run message
1 parent c1aa8cb commit 4e45c8b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/promote_release.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ import Request from './request.js';
1111
import Session from './session.js';
1212
import { existsSync } from 'node:fs';
1313

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+
1420
export default class ReleasePromotion extends Session {
1521
constructor(argv, cli, dir) {
1622
super(cli, dir, argv.prid);
@@ -372,6 +378,7 @@ export default class ReleasePromotion extends Session {
372378

373379
let prompt = 'Merge proposal branch into staging branch?';
374380
if (dryRun) {
381+
cli.info(dryRunMessage);
375382
cli.info('Run the following commands to merge the staging branch:');
376383
cli.info(`git push ${this.upstream} HEAD:refs/heads/${releaseBranch
377384
} HEAD:refs/heads/${stagingBranch}`);
@@ -400,6 +407,7 @@ export default class ReleasePromotion extends Session {
400407

401408
let prompt = `Push release tag and ${this.branch} to ${this.upstream}?`;
402409
if (dryRun) {
410+
cli.info(dryRunMessage);
403411
cli.info('Run the following commands to push to remote:');
404412
cli.info(`git push ${this.upstream} ${this.branch} ${tagVersion}`);
405413
prompt = 'Ready to continue?';
@@ -424,6 +432,7 @@ export default class ReleasePromotion extends Session {
424432
let prompt = 'Promote and sign release builds?';
425433

426434
if (dryRun) {
435+
cli.info(dryRunMessage);
427436
cli.info('Run the following command to sign and promote the release:');
428437
cli.info('./tools/release.sh -i <keyPath>');
429438
prompt = 'Ready to continue?';

0 commit comments

Comments
 (0)