Skip to content

Commit

Permalink
feat: add support for minor/preminor versions for custom templates (#185
Browse files Browse the repository at this point in the history
)

* feat: add support for minor/preminor versions for custom templates

* Tidy up

Co-authored-by: Pete Cook <[email protected]>
  • Loading branch information
sri-vr and cookpete authored May 21, 2021
1 parent 7404570 commit 44e8085
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ const enrichTag = ({ getCompareLink, tagPattern }) => (t, index, tags) => {
semver.valid(previous.version) &&
semver.diff(t.version, previous.version) === 'major'
),
minor: Boolean(
previous &&
semver.valid(t.version) &&
semver.valid(previous.version) &&
['minor', 'preminor'].includes(semver.diff(t.version, previous.version))
),
...t
}
}
Expand Down

0 comments on commit 44e8085

Please sign in to comment.