Move some functions around for testing
This commit is contained in:
parent
fbcd9ee398
commit
691b17dc56
1 changed files with 10 additions and 8 deletions
|
@ -5,6 +5,8 @@ def init_project():
|
||||||
# validate_values()
|
# validate_values()
|
||||||
version = Version('package.json')
|
version = Version('package.json')
|
||||||
version.parse()
|
version.parse()
|
||||||
|
version.increment(ReleaseLevel.SNAPSHOT)
|
||||||
|
print(version.get())
|
||||||
|
|
||||||
def prepare_release():
|
def prepare_release():
|
||||||
pass
|
pass
|
||||||
|
@ -12,14 +14,14 @@ def prepare_release():
|
||||||
def release_in_git():
|
def release_in_git():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class Version():
|
|
||||||
|
|
||||||
class ReleaseLevel(Enum):
|
class ReleaseLevel(Enum):
|
||||||
SNAPSHOT = 0
|
SNAPSHOT = 0
|
||||||
PATCH = 1
|
PATCH = 1
|
||||||
MINOR = 2
|
MINOR = 2
|
||||||
MAJOR = 3
|
MAJOR = 3
|
||||||
|
|
||||||
|
class Version():
|
||||||
|
|
||||||
def __init__(self, config_file_path):
|
def __init__(self, config_file_path):
|
||||||
self.version = "0.0.0"
|
self.version = "0.0.0"
|
||||||
self.config_file_path = config_file_path
|
self.config_file_path = config_file_path
|
||||||
|
@ -46,5 +48,5 @@ class Version():
|
||||||
case ReleaseLevel.MAJOR:
|
case ReleaseLevel.MAJOR:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get():
|
def get(self) -> str:
|
||||||
pass
|
return self.version
|
Loading…
Reference in a new issue