Open tunnckoCore opened 5 years ago
Hm, actually we dont use it in the app. So we should make git-commits-since and/or git-semver-tags work without git
, but with git log like string or array of commit message strings.
Use .listTags
instead of getLatestRelease
if pkg.workspaces
and/or lerna.json
is detected.
ref: https://octokit.github.io/rest.js/#api-Repos-listTags
Use listTags
, then .reduce
over them to .getTag
, so finally we'll have an array of tag objects which we should sort by tagger.date
to be able to get the latest tag (no matter for which package it is), the important thing is that date, because than we'll pass it to .getCommits
as { since: thatDate }
option. After all that, we'll have all needed commits, and actually to the same thing which you'll do on the @tunnckocore/release-cli
. Loop over all the commits, and for each of the packages inside each commit, call detectNextVersion
. The final result, will be an array of Result objects which includes { increment, lastVersion, nextVersion, pkg, ... }
So for each item in that array, we'll call .createTag
.
Needed changes in:
detect-next-version
parse-commit-message
new plugin (https://github.com/tunnckoCoreLabs/parse-commit-message/issues/56)recommended-bump
@tunnckocore/release-cli
(the future @standard-release/cli
)ref: Closing, based on https://github.com/conventional-commits/conventionalcommits.org/issues/118#issuecomment-464867324
Might not be needed. But out of curiosity, you can try to implement it as mentioned there - detect chore: release
commits messages (or whatever regex is given on the config option) and get all the commits between those commits, which will then be passed to detect-next-version
.
But in anyway, I don't think all this worth it and the time.
Also, latest comments on https://github.com/standard-release/cli/pull/3
Currently, I'm not sure if it works, but basically it should be easy to support it, because we are based on
git-semver-tags
which understands Lerna tags.