Chore: Staging mode determination (#5895)

* use 'is_staging_enabled' to determine if staging resource is used

* fix bug in 'is_running_staging'
This commit is contained in:
Jakub Trllo 2023-12-11 12:51:58 +01:00 committed by GitHub
parent 6d36857fe8
commit 2d73f6a6aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -140,7 +140,7 @@ def is_running_staging():
latest_version = get_latest_version(local=False, remote=True)
staging_version = latest_version
if current_version == production_version:
if current_version == staging_version:
return True
return is_staging_enabled()

View file

@ -1,6 +1,6 @@
import os
from openpype import AYON_SERVER_ENABLED
from openpype.lib.openpype_version import is_running_staging
from openpype.lib.openpype_version import is_staging_enabled
RESOURCES_DIR = os.path.dirname(os.path.abspath(__file__))
@ -59,7 +59,7 @@ def get_openpype_icon_filepath(staging=None):
return get_resource("icons", "AYON_icon_dev.png")
if staging is None:
staging = is_running_staging()
staging = is_staging_enabled()
if staging:
return get_openpype_staging_icon_filepath()
@ -68,7 +68,7 @@ def get_openpype_icon_filepath(staging=None):
def get_openpype_splash_filepath(staging=None):
if staging is None:
staging = is_running_staging()
staging = is_staging_enabled()
if AYON_SERVER_ENABLED:
if os.getenv("AYON_USE_DEV") == "1":