mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
have ability to get build version
This commit is contained in:
parent
02b8e57a81
commit
a160e22290
1 changed files with 13 additions and 0 deletions
|
|
@ -554,6 +554,19 @@ class OpenPypeVersion(semver.VersionInfo):
|
|||
|
||||
return sorted(_openpype_versions)
|
||||
|
||||
@staticmethod
|
||||
def get_build_version():
|
||||
"""Get version of OpenPype inside build."""
|
||||
openpype_root = Path(os.environ["OPENPYPE_ROOT"])
|
||||
build_version_str = BootstrapRepos.get_version(openpype_root)
|
||||
build_version = None
|
||||
if build_version_str:
|
||||
build_version = OpenPypeVersion(
|
||||
version=build_version_str,
|
||||
path=openpype_root
|
||||
)
|
||||
return build_version
|
||||
|
||||
@staticmethod
|
||||
def get_latest_version(
|
||||
staging: bool = False, local: bool = False) -> OpenPypeVersion:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue