Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to keep the metadata part when bumping version? #205

Open
martinm82 opened this issue Aug 7, 2019 · 0 comments
Open

How to keep the metadata part when bumping version? #205

martinm82 opened this issue Aug 7, 2019 · 0 comments

Comments

@martinm82
Copy link

Hello,

we are using semantic versioning (semver.org) in our projects and stumbled upon the following problem:

We have some projects that extend some other upstream projects with some functionality (eg. forks). We want to version our projects with the following semver schema:

1.2.3+4.2.1
1.2.3-SNAPSHOT+4.2.1

where 1.2.3 is our own version of the project and 4.2.1, the metadata part of semver, which reflects the upstream version our changes are based on.

When releasing our versions we would like to have the following flow:

# current_version=1.2.3-SNAPSHOT+4.2.1
$ bumpversion release
# current_version=1.2.3+4.2.1
$ bumpversion patch
# current_version=1.2.4-SNAPSHOT+4.2.1

Right now we use the following configuration:

parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-zA-Z]+))?
serialize =
  {major}.{minor}.{patch}-{release}
  {major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = rel
values =
  dev
  rel

Is it possible to implement this kind of workflow where the metadata part (eg. +4.2.1) won't be touched?
I have tried various things but did not come up with something that just leaves the metadata part.
Also it would be great to have one config that covers the case with +metadata and without it.

Thanks a lot.

@martinm82 martinm82 changed the title metadata part removed when bumping version How to keep the metadata part when bumping version Aug 7, 2019
@martinm82 martinm82 changed the title How to keep the metadata part when bumping version How to keep the metadata part when bumping version? Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant