phly / keep-a-changelog

Tools for manipulating CHANGELOG.md files in Keep A Changelog format, including tagging and releasing.
https://phly.github.io/keep-a-changelog/
BSD 2-Clause "Simplified" License
181 stars 21 forks source link

Strict mode for version:tag #60

Closed michalbundyra closed 4 years ago

michalbundyra commented 5 years ago

Feature Request

Q A
New Feature yes
BC Break no

Summary

I'd like to have additional checks on tagging:

weirdan commented 4 years ago

Yes please. I keep forgetting to commit and push the changelog before the tagging.

weierophinney commented 4 years ago
  • check if the (stable?) tag is on master (unless --force flag provided)

I don't think this is a good candidate at this time, in light of the release-branch-based strategy we're moving towards in Laminas. We could potentially have it check against the release branch after which it is named (e.g., a tag 3.2.7 would evaluate to a release-3.2.x branch), but I think that would only work if we also required another option for specifying the release branch name specifically.

  • check if the date is set in CHANGELOG.md for the given tag

This should be fairly easy to do via a listener; I'll start looking into that soon.

  • check if there is no any changes in the project (nothing to commit, working tree clean) (unless --force flag provided?)

It looks like I can use git status -s to do this, as it emits no output if no changes are present, and some output if there is.

weierophinney commented 4 years ago

Closing; I've done the second two items, and do not plan to address the first.