mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added method to get installed version
This commit is contained in:
parent
ad99d2a841
commit
6b5706ef78
1 changed files with 10 additions and 0 deletions
|
|
@ -522,6 +522,16 @@ class OpenPypeVersion(semver.VersionInfo):
|
|||
|
||||
return sorted(_openpype_versions)
|
||||
|
||||
@staticmethod
|
||||
def get_installed_version_str() -> str:
|
||||
"""Get version of local OpenPype."""
|
||||
|
||||
version = {}
|
||||
path = Path(os.environ["OPENPYPE_ROOT"]) / "openpype" / "version.py"
|
||||
with open(path, "r") as fp:
|
||||
exec(fp.read(), version)
|
||||
return version["__version__"]
|
||||
|
||||
@classmethod
|
||||
def get_build_version(cls):
|
||||
"""Get version of OpenPype inside build."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue