Skip to content

Commit

Permalink
Add --hide-credit option
Browse files Browse the repository at this point in the history
Fixes #166
  • Loading branch information
cookpete committed Jun 14, 2020
1 parent 0bbab49 commit 7e6ec74
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Options:
--sort-commits [property] # sort commits by property [relevance, date, date-desc], default: relevance
--release-summary # display tagged commit message body as release summary
--unreleased-only # only output unreleased changes
--hide-credit # hide auto-changelog credit
--handlebars-setup [file] # handlebars setup file
--append-git-log [string] # string to append to git log command
--stdout # output changelog to stdout
Expand Down
3 changes: 2 additions & 1 deletion src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ async function getOptions (argv) {
.option('--sort-commits <property>', `sort commits by property [relevance, date, date-desc], default: ${DEFAULT_OPTIONS.sortCommits}`)
.option('--release-summary', 'use tagged commit message body as release summary')
.option('--unreleased-only', 'only output unreleased changes')
.option('--hide-credit', 'hide auto-changelog credit')
.option('--handlebars-setup <file>', 'handlebars setup file')
.option('--append-git-log <string>', 'string to append to git log command')
.option('--stdout', 'output changelog to stdout')
Expand Down Expand Up @@ -96,7 +97,7 @@ async function run (argv) {
const latestVersion = await getLatestVersion(options, tags)
const onParsed = ({ title }) => log(`Fetched ${title}…`)
const releases = await parseReleases(tags, remote, latestVersion, options, onParsed)
const changelog = await compileTemplate(options, { releases })
const changelog = await compileTemplate(options, { releases, options })
await write(changelog, options, log)
}

Expand Down
4 changes: 3 additions & 1 deletion templates/compact.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
{{#unless options.hideCredit}}
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
{{/unless}}

{{#each releases}}
{{#if href}}
Expand Down
4 changes: 3 additions & 1 deletion templates/keepachangelog.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
{{#unless options.hideCredit}}
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
{{/unless}}

{{#each releases}}
{{#if href}}
Expand Down

0 comments on commit 7e6ec74

Please sign in to comment.