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
182 stars 23 forks source link

Feature: read package name from composer.json #29

Closed geerteltink closed 5 years ago

geerteltink commented 6 years ago

It would be nice to read the package name from composer.json if it's omitted.

Instead of doing this:

$ keep-a-changelog tag --package zendframework/<package_name> x.x.x

You would do this:

$ keep-a-changelog tag x.x.x
$ keep-a-changelog release x.x.x
weierophinney commented 6 years ago

I've been somewhat reluctant to do this, as that makes it primarily useful to PHP developers. But... it's written in PHP, so that's not necessarily a bad assumption to make. Essentially, if no package is provided, it could look through a list of potential files in order to discover the value, with composer.json being the first we develop support for.

The main problem is that what is now an explicit argument becomes an option, which would mean different syntax, which is a BC break; we'd have to target a future 2.0 version.

Marking as "help wanted", if anybody wants to pick this up.

weierophinney commented 5 years ago

As of 2.0.0, you can now configure the package name using one of: