From e50cdce379fc56d5176fcf6364d82b13d87dfd05 Mon Sep 17 00:00:00 2001 From: Jim Shepich III Date: Tue, 3 Feb 2026 02:28:47 -0500 Subject: [PATCH] Fixed Git LFS --- config.yaml | 1 + jimsite/assets.py | 7 +++++++ jimsite/common.py | 1 + 3 files changed, 9 insertions(+) diff --git a/config.yaml b/config.yaml index 93a5532..7f2f80d 100644 --- a/config.yaml +++ b/config.yaml @@ -30,6 +30,7 @@ sites: git_repo: url: ssh://gitea/jim/dogma-jimfinium.git branch: pub + lfs: true build_cache: ./build/dogma-jimfinium web_root: ./dist/dogma-jimfinium assets: diff --git a/jimsite/assets.py b/jimsite/assets.py index 5b65afc..756cd06 100644 --- a/jimsite/assets.py +++ b/jimsite/assets.py @@ -19,6 +19,13 @@ def pull_git_repo(repo: GitRepo, build_cache: str) -> None: else: run(f"git clone {repo.url}{(' -b '+repo.branch) if repo.branch else ''} -o {repo.remote} {build_cache}") + # Download all LFS files. + if repo.lfs: + run('git lfs fetch --all') + run('git lfs pull') + + return None + def copy_assets(site: SiteConfig) -> None: '''Copies the list of site assets from the build cache to the web root. diff --git a/jimsite/common.py b/jimsite/common.py index 05752b3..faea63b 100644 --- a/jimsite/common.py +++ b/jimsite/common.py @@ -30,6 +30,7 @@ class GitRepo(pydantic.BaseModel): url: str branch: Optional[str] = None remote: Optional[str] = 'origin' + lfs: Optional[bool] = False class SiteConfig(pydantic.BaseModel): base_url: str