mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-06-26 18:25:36 -04:00
version: add kbs version check functionality and CLI
This commit is contained in:
parent
c844978b4d
commit
821bde59e9
7 changed files with 190 additions and 0 deletions
12
version/compare.py
Normal file
12
version/compare.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from enum import IntEnum
|
||||
from semver import Version
|
||||
|
||||
|
||||
class VerComp(IntEnum):
|
||||
RIGHT_NEWER = -1
|
||||
EQUAL = 0
|
||||
RIGHT_OLDER = 1
|
||||
|
||||
|
||||
def semver_compare(a: str, b: str) -> VerComp:
|
||||
return VerComp(Version.parse(a).compare(b))
|
Loading…
Add table
Add a link
Reference in a new issue