Skip to content

Commit

Permalink
chore(prepare): show instruction at finished (#554)
Browse files Browse the repository at this point in the history
* feat(prepare): show friendly instruction message

Show friendly instruction message after all prepare process

* chore: fix typo

* chore: fix typo

Co-Authored-By: Eunjae Lee <[email protected]>

* chore: proofs

* fix: suppress message when dry-run

Co-authored-by: Eunjae Lee <[email protected]>
  • Loading branch information
2 people authored and Eunjae Lee committed Dec 24, 2019
1 parent 050c008 commit 35b89c9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/shipjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@
"jest": "24.9.0",
"jest-watch-typeahead": "0.4.2"
}
}
}
3 changes: 2 additions & 1 deletion packages/shipjs/src/flow/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ async function prepare({
version: nextVersion,
pullRequestUrl,
});
finished();

finished({ baseBranch, stagingBranch, pullRequestUrl, dryRun });
}

const arg = {
Expand Down
18 changes: 17 additions & 1 deletion packages/shipjs/src/step/finished.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
import chalk from 'chalk';
import runStep from './runStep';
import { print } from '../util';

export default () => runStep({ title: 'All Finished.' }, () => {});
export default ({ baseBranch, stagingBranch, pullRequestUrl, dryRun }) =>
runStep({ title: 'All Finished.' }, () => {
if (dryRun) return;

print(`
You are currently on ${chalk.green.bold(stagingBranch)} branch.
You can make changes to the release materials including CHANGELOG.md, and continue to prepare the next release.
${pullRequestUrl}
Otherwise, you can safely check out another branch and get back to your development iteration.
To check out the previous branch, run the following:
$ git checkout ${baseBranch}`);
});

0 comments on commit 35b89c9

Please sign in to comment.