versioning
This commit is contained in:
12
config/version.py
Normal file
12
config/version.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# python
|
||||
# file: config/version.py
|
||||
import os
|
||||
|
||||
BASE_VERSION = "1.0.0" # update manually when releasing features
|
||||
|
||||
def get_full_version() -> str:
|
||||
"""
|
||||
Return semantic version with optional Jenkins build metadata, e.g. 1.2.3+build.456.
|
||||
"""
|
||||
build = os.environ.get("BUILD_NUMBER") or os.environ.get("APP_BUILD")
|
||||
return f"{BASE_VERSION}+build.{build}" if build else BASE_VERSION
|
||||
Reference in New Issue
Block a user