Skip to content

Commit

Permalink
feat: add --root option
Browse files Browse the repository at this point in the history
  • Loading branch information
lekterable committed Apr 23, 2020
1 parent dbd5fa0 commit b813606
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Latest

- refactor: move commands to separate files dbd5fa05
- feat: add initialize config feature 187e9201
- feat: add package version b9108801
- feat: prepend the CHANGELOG file instead of rewriting it 960ea6f5
Expand Down
1 change: 1 addition & 0 deletions bin/perfekt.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ program
.command('changelog [version]')
.description('generate package changelog')
.option('--write', 'write the output to file')
.option('--root', 'generate changelog for the entire history')
.action((version, options) => changelog(version, options))

program
Expand Down
2 changes: 1 addition & 1 deletion src/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

export const changelog = async (version, options) => {
const title = version || 'Latest'
const latestTag = await getLatestTag()
const latestTag = !options.root && (await getLatestTag())
const commits = await getCommits(latestTag)
const latestCommit = getCommitDetails(commits[0])
const isReleaseLatest = latestCommit.scope === 'release'
Expand Down

0 comments on commit b813606

Please sign in to comment.