Move some functions around for testing

This commit is contained in:
bom 2023-02-08 11:37:41 +01:00
parent fbcd9ee398
commit 691b17dc56

View file

@ -5,6 +5,8 @@ def init_project():
# validate_values()
version = Version('package.json')
version.parse()
version.increment(ReleaseLevel.SNAPSHOT)
print(version.get())
def prepare_release():
pass
@ -12,14 +14,14 @@ def prepare_release():
def release_in_git():
pass
class Version():
class ReleaseLevel(Enum):
SNAPSHOT = 0
PATCH = 1
MINOR = 2
MAJOR = 3
class Version():
def __init__(self, config_file_path):
self.version = "0.0.0"
self.config_file_path = config_file_path
@ -46,5 +48,5 @@ class Version():
case ReleaseLevel.MAJOR:
pass
def get():
pass
def get(self) -> str:
return self.version