javascript-studio/studio-changes

Support different tagging schemes

Closed this issue · 2 comments

tivac commented

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.

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

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.