javascript-studio / studio-changes

📦 Generate a changelog as part of the npm version command
https://medium.com/javascript-studio/nice-and-easy-module-releases-a32c906b564e
MIT License
49 stars 7 forks source link

Support different tagging schemes #15

Closed tivac closed 6 years ago

tivac commented 7 years ago

Right now changes expects all tags to be in the format v<semver>, which works for some repos. I've been using lerna recently to manage a monorepo and would like to use changes with it to create per-package changelists.

It's easy enough to run changes in each package with lerna exec, but since lerna's tagging uses the format <package-name>@<semver> the git log call within changes fails with the following error:

fatal: ambiguous argument 'v5.1.5..HEAD': unknown revision or path not in the working tree.

which makes sense, v5.1.5 isn't the tag. modular-css-core@5.1.5 is.

mantoni commented 7 years ago

I would accept a pull request to override the default with a command line switch.

What would be a good way to do this? Maybe --tag "${name}@${version}" and substitute the ${...} placeholders with properties from the package.json?

tivac commented 7 years ago

Pulling values from package.json is clever, I hadn't considered that but I really like it! I'll see about putting a PR together for this.