Plan for lack of version
This commit is contained in:
parent
b81338a849
commit
116961f1f7
@ -107,8 +107,10 @@ class SemVer(object):
|
||||
current_config = re.search(pattern, config_file)
|
||||
if current_config:
|
||||
config_file.replace(current_config, "current_version = " + get_tag_version())
|
||||
with open(".bumpversion.cfg", "w") as file:
|
||||
file.write(config_file)
|
||||
else:
|
||||
config_file.replace("[bumpversion]","[bumpversion]\ncurrent_version = " + get_tag_version())
|
||||
with open(".bumpversion.cfg", "w") as file:
|
||||
file.write(config_file)
|
||||
|
||||
# version repo
|
||||
p = subprocess.Popen(['bumpversion', self.version_type],
|
||||
|
@ -12,7 +12,7 @@ except ImportError:
|
||||
DEVNULL = open(os.devnull, 'wb')
|
||||
|
||||
def get_tag_version():
|
||||
version = "develop"
|
||||
version = "0.0.0"
|
||||
|
||||
tagged_versions = subprocess.Popen(['git','tag','-l','[0-9]*.[0-9]*.[0-9]*'],
|
||||
stdout=subprocess.PIPE, stderr=DEVNULL, cwd=".").stdout.read().decode('utf-8').rstrip().split('\n')
|
||||
|
Loading…
Reference in New Issue
Block a user