Fixed Git LFS
This commit is contained in:
parent
9641c572c1
commit
e50cdce379
@ -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:
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user