Skip to content

Commit

Permalink
Store alpha configuration in seperate folder
Browse files Browse the repository at this point in the history
CURA-11563
  • Loading branch information
casperlamboo committed Jan 19, 2024
1 parent 9940c31 commit 830244e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions UM/Resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,15 @@ def _getCacheStorageRootPath(cls) -> Optional[str]:

@classmethod
def __initializeStoragePaths(cls) -> None:
Logger.log("d", "Initializing storage paths")
# use nested structure: <app-name>/<version>/...
if cls.ApplicationVersion in ["master", "main", "dev"] or cls.ApplicationVersion == "unknown":
storage_dir_name = os.path.join(cls.ApplicationIdentifier, cls.ApplicationVersion)
else:
version = Version(cls.ApplicationVersion)
storage_dir_name = os.path.join(cls.ApplicationIdentifier, "%s.%s" % (version.getMajor(), version.getMinor()))
if version.hasPostFix() and version.getPostfixType() == "alpha":

This comment has been minimized.

Copy link
@wawanbreton

wawanbreton Jan 19, 2024

Contributor

We're not doing this for beta too ?

This comment has been minimized.

Copy link
@wawanbreton

wawanbreton Jan 19, 2024

Contributor

Let's discuss this for next beta

storage_dir_name = os.path.join(cls.ApplicationIdentifier,
f"{version.getMajor()}.{version.getMinor()}-{version.getPostfixType()}")
else:
storage_dir_name = os.path.join(cls.ApplicationIdentifier, f"{version.getMajor()}.{version.getMinor()}")

# config is saved in "<CONFIG_ROOT>/<storage_dir_name>"
cls.__config_storage_path = os.path.join(Resources._getConfigStorageRootPath(), storage_dir_name)
Expand Down

0 comments on commit 830244e

Please sign in to comment.