Commit 442e6185 authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

fix max sync

parent 5b3e985c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -284,14 +284,17 @@ def _copy_max_tree(
        shutil.copytree(
            Path(tmpdirname, f"max-v2-{max_release_name}", "src", "main", "core"),
            Path(dot_max_dir, "basex", "webapp", "max", "core"),
            dirs_exist_ok=True,
        )
        shutil.copytree(
            Path(tmpdirname, f"max-v2-{max_release_name}", "src", "main", "bundles"),
            Path(dot_max_dir, "basex", "webapp", "max", "bundles"),
            dirs_exist_ok=True,
        )
        shutil.copytree(
            Path(tmpdirname, f"max-v2-{max_release_name}", "src", "resources"),
            Path(dot_max_dir, "resources"),
            dirs_exist_ok=True,
        )


@@ -358,7 +361,9 @@ def _sync_max_instance(root_directory: Path, verbose=True):
    config = MaXProjectConfig(Path(root_directory, "config.xml"))
    config.max_version_from_max_dir
    dot_max_dir = Path(root_directory, ".max")
    if not os.path.isdir(dot_max_dir):
    if not os.path.isdir(
        dot_max_dir
    ) or config.max_version_from_max_dir != config.max_version.get("name"):
        dot_max_dir.mkdir(parents=True, exist_ok=True)
        basex_zip_destination = Path(dot_max_dir, "BaseX.zip")
        cached_download(BASEX_DISTRO, basex_zip_destination)