Merge pull request #10 from RightBrain-Networks/bugfix/re-match-to-string
change re.match object to string by grouping the findings together
This commit is contained in:
commit
76186cf543
@ -106,7 +106,7 @@ class SemVer(object):
|
||||
pattern = re.compile("current_version = [0-9.]*")
|
||||
current_config = re.search(pattern, config_file)
|
||||
if current_config:
|
||||
config_file.replace(current_config, "current_version = " + get_tag_version())
|
||||
config_file.replace(current_config.group(0), "current_version = " + get_tag_version())
|
||||
else:
|
||||
config_file.replace("[bumpversion]","[bumpversion]\ncurrent_version = " + get_tag_version())
|
||||
with open(".bumpversion.cfg", "w") as file:
|
||||
|
Loading…
Reference in New Issue
Block a user