mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
replaced get_local_live_version with get_installed_version_str
This commit is contained in:
parent
6b5706ef78
commit
1b4e5dd443
2 changed files with 4 additions and 14 deletions
|
|
@ -690,16 +690,6 @@ class BootstrapRepos:
|
|||
return v.path
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def get_local_live_version() -> 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__"]
|
||||
|
||||
@staticmethod
|
||||
def get_version(repo_dir: Path) -> Union[str, None]:
|
||||
"""Get version of OpenPype in given directory.
|
||||
|
|
@ -747,7 +737,7 @@ class BootstrapRepos:
|
|||
# version and use it as a source. Otherwise repo_dir is user
|
||||
# entered location.
|
||||
if not repo_dir:
|
||||
version = self.get_local_live_version()
|
||||
version = OpenPypeVersion.get_installed_version_str()
|
||||
repo_dir = self.live_repo_dir
|
||||
else:
|
||||
version = self.get_version(repo_dir)
|
||||
|
|
|
|||
6
start.py
6
start.py
|
|
@ -794,7 +794,7 @@ def _bootstrap_from_code(use_version, use_staging):
|
|||
assert local_version
|
||||
else:
|
||||
# get current version of OpenPype
|
||||
local_version = bootstrap.get_local_live_version()
|
||||
local_version = OpenPypeVersion.get_installed_version_str()
|
||||
|
||||
# All cases when should be used different version than build
|
||||
if (use_version and use_version != local_version) or use_staging:
|
||||
|
|
@ -930,7 +930,7 @@ def boot():
|
|||
if getattr(sys, 'frozen', False):
|
||||
local_version = bootstrap.get_version(Path(OPENPYPE_ROOT))
|
||||
else:
|
||||
local_version = bootstrap.get_local_live_version()
|
||||
local_version = OpenPypeVersion.get_installed_version_str()
|
||||
|
||||
if "validate" in commands:
|
||||
_print(f">>> Validating version [ {use_version} ]")
|
||||
|
|
@ -978,7 +978,7 @@ def boot():
|
|||
if getattr(sys, 'frozen', False):
|
||||
local_version = bootstrap.get_version(Path(_openpype_root))
|
||||
else:
|
||||
local_version = bootstrap.get_local_live_version()
|
||||
local_version = OpenPypeVersion.get_installed_version_str()
|
||||
|
||||
list_versions(openpype_versions, local_version)
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue