From 79e28bb45cef7e8b76117157e3e2abca4db1a2c8 Mon Sep 17 00:00:00 2001 From: Der_Googler <54764558+DerGoogler@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:02:20 +0200 Subject: [PATCH] . --- .gitattributes | 2 ++ .github/workflows/generate-mmar.yml | 2 ++ .lfsconfig | 2 ++ generate-modules.py | 6 +++--- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .gitattributes create mode 100644 .lfsconfig diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7eb20ac --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.zip filter=lfs diff=lfs merge=lfs -text + diff --git a/.github/workflows/generate-mmar.yml b/.github/workflows/generate-mmar.yml index 5fcda87..1850629 100644 --- a/.github/workflows/generate-mmar.yml +++ b/.github/workflows/generate-mmar.yml @@ -46,8 +46,10 @@ jobs: run: | git config --global user.email "jimmyboehm@dergoogler.com" git config --global user.name "Googlers Repo Service" + git lfs install git add . git commit -sm "Update MMAR mirrors" || true + git lfs migrate import --include="*.zip" -y git push || true build: diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000..07fe65e --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + fetchinclude = zips/** \ No newline at end of file diff --git a/generate-modules.py b/generate-modules.py index 6560947..144a1e9 100644 --- a/generate-modules.py +++ b/generate-modules.py @@ -100,9 +100,9 @@ def does_object_exists(repo: Repository, object_path: str) -> bool: if properties.get("noIndex") or properties.get("gr_ignore"): continue else: - # repo_dir = f"module/{repo.name}" - # Repo.clone_from(repo.clone_url, repo_dir) - # shutil.make_archive(f"zips/{repo.name}", 'zip', repo_dir) + repo_dir = f"module/{repo.name}" + Repo.clone_from(repo.clone_url, repo_dir) + shutil.make_archive(f"zips/{REPO_SCOPE}/{repo.name}", 'zip', repo_dir) # Append to skeleton meta.get("modules").append(module)