uplift icon indicating copy to clipboard operation
uplift copied to clipboard

[Feature]: Allow configurable strings to trigger MAJOR,MINOR,PATCH bump

Open 4x0v7 opened this issue 2 years ago • 4 comments

Describe your feature

Currently, only commits with fix: will trigger a PATCH version bump.

Allow users to configure other text that will trigger a PATCH update.

For example, perhaps I want docs: or dev: to bump the patch version.

Perhaps this doesn't quite conform to Conventional Commits 1.0.0 but it would a useful addition nonetheless.

Your potential solution

I can image extending the yaml config with something like this:

conventionalCommitPatterns:
  major:
    - "feat!:"
  # minor:
  patch:
    - "docs:"
    - "dev:"

Any additional information?

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

4x0v7 avatar Feb 06 '23 12:02 4x0v7

Hi @4x0v7, thanks for raising this issue. I like the idea of extending the patterns used by uplift to make it more flexible. I have thought about it in the past. The Conventional Commits specification recommends the current prefixes and is based on the Angular spec. Let me have a think

ga-paul-t avatar Feb 09 '23 19:02 ga-paul-t

Initially when starting to use uplift, I couldn't figure out why the patch version wasn't being updated. After looking at the source I found it was because only fix was triggering it. I think this is potentially more useful in early stages of development, when you're iterating a lot before a 1.0.0 release. For example this repo got into the hundreds of patch version before even a 0.1.0 release https://github.com/codefresh-io/cli-v2/compare/v0.0.567…v0.0.568 Although they're not strictly adhering to the Conventional Commits specification.

4x0v7 avatar Feb 10 '23 01:02 4x0v7

I just made automation on our end to update dependencies, which creates commits with deps: prefix. I would like that to trigger a release, but calling it a "fix" seems wrong. Having the ability to configure this would be great.

Alxandr avatar May 12 '23 07:05 Alxandr

+1

tony-engineering avatar Mar 29 '24 13:03 tony-engineering