Question: how to use parse to deal only with major version?
See original GitHub issueHi, after discovering this more up-to-date fork of the original bumpversion project, I’m in the process of switching over to it and I have a question.
I already use bumpversion to maintain version #'s in a few files, where the version # is the full version # (e.g. 3.2.5). I have a scenario where I want to maintain only the major version # within a go.mod file. Within this file I have a module directive like this:
module github.com/IBM/go-sdk-core/v3
where “3” represents the current major version of the package. I’d like to be able to configure bumpversion to bump this to “v4” when the next major version is created.
It looks like I could maybe use a combination of the “parse” and “search” directives within a [bumpversion:file:...]
section in my cfg file. Anyone done this before?
It would be great if the README contained an example of this (after figuring this out, I would be happy to submit a PR for that).
Thanks in advance!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
I would go for #2 and move the examples to a separate file (or a repository folder) once we have more of them.
@florisla I’m ready to add a “go.mod” example to the project’s README file. I think there are two options for this:
parse
optionUsing bumpversion in a script
with heading something likeUsing bumpversion to maintain a go.mod file
I’m sort of leaning toward #2. Do you have a preference?