marcocesarato / php-conventional-changelog

A PHP tool built to generate a changelog from a project's commit messages and metadata following the conventionalcommits.org and automate versioning with semver.org.
GNU General Public License v3.0
230 stars 32 forks source link

feat: optional tag annotation support #34

Closed kishieel closed 2 years ago

kishieel commented 2 years ago

Why this PR?

Instead of lightweight tags, I would like to have annotated tags when generating the changelog.

What changed?

As annotation flag is optional nothing change for current users of package. Those who would like to have annotated tags may use --annotate-tag flag on current release scripts. The new flag uses an optional value, which is a message to be used to annotate the tag. If no value is given, the tag name will be used as an annotation.

Examples

"scripts": [
    "release": "conventional-changelog --commit", # works as before pr
    "release:no-message": "conventional-changelog --annotate-tag --commit", # uses tag name as annotation message 
    "release:with-message": "conventional-changelog --annotate-tag 'custom message' --commit", # uses 'custom message' as annotation message 
]