diff --git a/scripts/release/assets.py b/scripts/release/assets.py index 45b7d6160..f16f67680 100644 --- a/scripts/release/assets.py +++ b/scripts/release/assets.py @@ -16,6 +16,7 @@ from core.sizes import size_text from model.composition import composition_tier from model.registry import data_dir_registry_at from model.largefiles import ( + LARGE_FILES_CACHE, LARGE_FILES_RELEASE, LARGE_FILES_REPO, RELEASE_DOWNLOAD, @@ -248,7 +249,7 @@ def registry_bundles(registry_path: str = DATA_DIRS_FILE) -> dict[str, str]: return bundles -def cache_hashes(names: set[str], cache_dir: str = ".cache/large") -> dict[str, str]: +def cache_hashes(names: set[str], cache_dir: str = LARGE_FILES_CACHE) -> dict[str, str]: """SHA1 of the cached copy of each named asset that the cache holds.""" hashes: dict[str, str] = {} for name in names: diff --git a/scripts/restore_large_files.py b/scripts/restore_large_files.py index 9dff2bbfa..86e39321d 100644 --- a/scripts/restore_large_files.py +++ b/scripts/restore_large_files.py @@ -22,13 +22,14 @@ import sys from pathlib import Path from core.cli import add_repo_inputs +from model.largefiles import LARGE_FILES_CACHE from release.restore import restore def main() -> None: parser = argparse.ArgumentParser(allow_abbrev=False, description=__doc__) parser.add_argument( - "--cache", default=".cache/large", + "--cache", default=LARGE_FILES_CACHE, help="where release assets are cached (default: %(default)s)", ) add_repo_inputs(parser, "db") diff --git a/scripts/unattended/worktree.py b/scripts/unattended/worktree.py index aebbeb2c6..68680239c 100644 --- a/scripts/unattended/worktree.py +++ b/scripts/unattended/worktree.py @@ -78,10 +78,10 @@ def _hardlink_tree(src: Path, dst: Path) -> None: def seed_worktree(repo: Path, worktree: Path) -> list[str]: """Hard-link what git does not carry: a tool deleting a file drops a link.""" - from model.largefiles import load_registered_paths + from model.largefiles import LARGE_FILES_CACHE, load_registered_paths seeded = [] - for rel in [".cache/large", "data", *load_registered_paths(repo / ".gitignore")]: + for rel in [LARGE_FILES_CACHE, "data", *load_registered_paths(repo / ".gitignore")]: src, dst = repo / rel, worktree / rel if src.exists() and not dst.exists(): _hardlink_tree(src, dst)