You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ive started to try it out now, I copied the bumpversion.cfg config from this project and it does not work..
I did leave autocommit there so there was an 2.0.0-dev release tag created and thats where things started to go wrong.
The hypen in the -dev tag messes up a string split you have in the latest_tag_info function.
A slightly modified snippet with logging:
deflatest_tag_info(cls):
try:
# git-describe doesn't update the git-index, so we do thatsubprocess.check_output(["git", "update-index", "--refresh"])
# get info about the latest tag in gitdescribe_out=subprocess.check_output([
"git",
"describe",
"--dirty",
"--tags",
"--long",
"--abbrev=40",
"--match=v*",
], stderr=subprocess.STDOUT
).decode().split("-")
exceptsubprocess.CalledProcessError:
# logger.warn("Error when running git describe")return {}
info= {}
printdescribe_outifdescribe_out[-1].strip() =="dirty":
info["dirty"] =Truedescribe_out.pop()
printdescribe_outinfo["commit_sha"] =describe_out.pop().lstrip("g")
printdescribe_outinfo["distance_to_latest_tag"] =int(describe_out.pop())
printdescribe_outinfo["current_version"] =describe_out.pop().lstrip("v")
printdescribe_out# assert type(info["current_version"]) == strassert0==len(describe_out)
and output
a01@whale¤%&! bumpversion
[u'v2.0.0', u'dev', u'2', u'gf176a005e91bfb3addee4cdf096a90fd34f4287a\n']
[u'v2.0.0', u'dev', u'2', u'gf176a005e91bfb3addee4cdf096a90fd34f4287a\n']
[u'v2.0.0', u'dev', u'2']
[u'v2.0.0', u'dev']
[u'v2.0.0']
Traceback (most recent call last):
File "/home/a00001/.virtualenvs/default/bin/bumpversion", line 9, in <module>
load_entry_point('bumpversion==0.5.0', 'console_scripts', 'bumpversion')()
File "/home/a00001/.virtualenvs/default/local/lib/python2.7/site-packages/bumpversion/__init__.py", line 652, in main
vcs_info.update(vcs.latest_tag_info())
File "/home/a00001/.virtualenvs/default/local/lib/python2.7/site-packages/bumpversion/__init__.py", line 148, in latest_tag_info
assert 0 == len(describe_out)
AssertionError
The text was updated successfully, but these errors were encountered:
Originally reported by @thomasf in #43:
Ive started to try it out now, I copied the bumpversion.cfg config from this project and it does not work..
I did leave autocommit there so there was an 2.0.0-dev release tag created and thats where things started to go wrong.
The hypen in the -dev tag messes up a string split you have in the
latest_tag_info
function.A slightly modified snippet with logging:
and output
The text was updated successfully, but these errors were encountered: