feat: kata version manager __init__ configured and methods created
This commit is contained in:
parent
e18a3f062f
commit
ec105d44be
@ -1,3 +1,31 @@
|
|||||||
class VersionManager:
|
class VersionManager:
|
||||||
def __init__(self, version):
|
def __init__(self, version="0.0.1"):
|
||||||
|
version = version.split(".")[:3]
|
||||||
|
try:
|
||||||
|
for val in version:
|
||||||
|
assert val.isdecimal(), "Error occured while parsing version!"
|
||||||
|
except AssertionError as error:
|
||||||
|
print(error)
|
||||||
|
|
||||||
|
self.version = ".".join(version)
|
||||||
|
self.history = [self.version]
|
||||||
|
|
||||||
|
def major(self) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def minor(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def path(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def rollback(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def release(self) -> str:
|
||||||
|
return f"{self.version}"
|
||||||
|
|
||||||
|
|
||||||
|
test = VersionManager("1.1")
|
||||||
|
print(test.version)
|
||||||
|
print(test.history)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user