Commit 65a37c4
committed
feat(changelog-generator): make --version optional when --dry-run is on
This makes the workflow described in:
#87 (comment)
a bit easier.
Namely, when you are about to cut a release, and you want to preview
what will go into the changelog and use that to guide your decision
about whether to make this a `--patch`, `--minor` or `--major` (etc)
release, you can just run the generator with the `--dry-run` switch,
ignoring the usual requirement to pass a `--version`.
Test plan:
1. Try running the generator without a `--version` and see it complain:
```
changelog-generator ❯ bin/liferay-changelog-generator.js
error: Missing required option: --version; see --help for usage
zsh: exit 1 bin/liferay-changelog-generator.js
```
2. Repeat the test, this time with `--dry-run`, and see this:
```
changelog-generator ❯ bin/liferay-changelog-generator.js --dry-run
Using phony version changelog-generator/v0.0.0-placeholder during --dry-run
____________________
(_) `
| |
| changelog.js |
| ============ |
| |
| Reporting |
| for duty! |
| |
|__________________|
(_)_________________)
Fetching remote tags: run with --no-update-tags to skip
## [changelog-generator/v0.0.0-placeholder](https://github.com/liferay/liferay-frontend-projects/tree/changelog-generator/v0.0.0-placeholder) (2020-10-05)
[Full changelog](changelog-generator/v1.5.0...changelog-generator/v0.0.0-placeholder)
### 📖 Documentation
- docs(changelog-generator): update project links ([\#94](#94))
[--dry-run] Would write ./CHANGELOG.md 6943 bytes ✨
```1 parent 587d61c commit 65a37c4
File tree
1 file changed
+15
-4
lines changed- projects/npm-tools/packages/changelog-generator/src
1 file changed
+15
-4
lines changedLines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
| 598 | + | |
| 599 | + | |
599 | 600 | | |
600 | | - | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
601 | 611 | | |
602 | 612 | | |
603 | 613 | | |
| |||
692 | 702 | | |
693 | 703 | | |
694 | 704 | | |
695 | | - | |
| 705 | + | |
| 706 | + | |
696 | 707 | | |
697 | 708 | | |
698 | 709 | | |
| |||
0 commit comments