-
Notifications
You must be signed in to change notification settings - Fork 146
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
allow to specify non-numeric parts #43
Comments
I just recalled that the monster of project automation tools, maven has a plugin like this: http://maven.apache.org/maven-release/maven-release-plugin/ However I do not want anything to be like maven so its just for reference :) |
Yes, that's something I'd like to support. I just fiddled a bit in This part already works:
However, when you'd want to bump the
which would tell bumpversion to count
to bump from |
Side note 1: I don't think it's a good idea to support "running an command after ...", but support your workflow like
so you can use bumpversion at the beginning and the end of the release process. Side note 2: No, this project won't go the same path as maven's release plugin and its scope is only about bumping versions, nothing else. |
Side note 3: I also need to create a "cookbook" documentation page to demonstrate custom workflows/use cases complete with motiviation and config files. |
yeah. keeping it simple with a separate prerel command is better than introducing complexities like having automatic intermediate versions and running commands between them. I can use an ordinary Makefile or similar for those things if they are needed. |
The prerel task should be configurable to ignore |
How about
? |
Yeah. I did think about that as well. I've just started using this tool today, I might start by writing a simpler makefile that does the tasks around bumpversion and let it sink in for a while, |
Had some time to play with the code, here's a working implementation with your example serving as a testcase: a7bd204#diff-f4bc68ff01eef7bed2f3a64cad7d37caR1163 I as well need to let that sink in for a while to figure out if that can be made simpler from a conceptual point of view and/or from the code I wrote. You should be able to use
to install and play with it. Have fun and let me know what you think. |
I will check it out as soon as I can.. FYI: It is important that 1.2dev is parsed as an pre prelease of 1.2 and that 1.2.dev is something else, At least if you are targeting python packaging using setuptools http://pythonhosted.org/setuptools/setuptools.html#specifying-your-project-s-version edit: that was misinformation 1.2.dev is allowed.. I remembered the wrong thing. |
Hey, made a few adjustments, but basically I added a new test heavily inspired by PEP386 (i know, it's superseded by PEP440, but this is just for illustratory purposes). Lines 1192 to 1249 in 3f1bfce
So, this configures a part type Now works like this:
Do you think that might work for you? |
Note to myself: It might be a good idea to allow numeric values to also have a start value other than |
Merged. |
This will be part of the upcoming version 0.5 — which you can install by running
I'd appreciate any testing before the release. Please note the new configuration format (documented in the README) |
I will try it out, have to get to that versioning scheme very soon, |
Ive started to try it out now, I copied the bumpversion.cfg config from this project and it does not work.. The hypen in the -dev tag messes up a string split you have in the A slightly modified snippet with logging: def latest_tag_info(cls):
try:
# git-describe doesn't update the git-index, so we do that
subprocess.check_output(["git", "update-index", "--refresh"])
# get info about the latest tag in git
describe_out = subprocess.check_output([
"git",
"describe",
"--dirty",
"--tags",
"--long",
"--abbrev=40",
"--match=v*",
], stderr=subprocess.STDOUT
).decode().split("-")
except subprocess.CalledProcessError:
# logger.warn("Error when running git describe")
return {}
info = {}
print describe_out
if describe_out[-1].strip() == "dirty":
info["dirty"] = True
describe_out.pop()
print describe_out
info["commit_sha"] = describe_out.pop().lstrip("g")
print describe_out
info["distance_to_latest_tag"] = int(describe_out.pop())
print describe_out
info["current_version"] = describe_out.pop().lstrip("v")
print describe_out
# assert type(info["current_version"]) == str
assert 0 == len(describe_out) and output
|
sorry for not creating a new ticket, was in a bit of a hurry earlier. |
This will do. Looks like the parsing of |
This is tracked in #51 now. |
Basically I always want the master to not be set to a specific version but a
dev version so that accidental pushes to package repositories happen.
example:
bumpversion minor
changes version strings from 1.5dev to 1.5, tagsand commits and then changes to 1.6dev and commits that as a separate thing.
There should probably be an option for running an command after tagging for
building and publishing build artifacts.
How this would work with
bumpversion patch
is at the moment (by me) undefined.I will get back to detailing this later on, thanks for a great app.
The text was updated successfully, but these errors were encountered: