fix: push files via Git LFS instead of raw blobs

Binary files (.glb, .gltf, .png, .jpg, .jpeg, .webp) were pushed as raw
Git blobs via Octokit, bypassing Git LFS. This caused LFS-tracked repos
to see all files as modified after git pull, requiring spurious commits.

Now the bot uploads binaries to the LFS server via the Batch API and
stores LFS pointer files in the Git tree. Also fixes getRemoteFolder()
to read the real file size from LFS pointers instead of the pointer size.
This commit is contained in:
Tom Boullay
2026-04-15 09:38:05 +02:00
parent 616eb26206
commit 8bbc0dc0eb
2 changed files with 222 additions and 14 deletions
+3
View File
@@ -6,6 +6,9 @@ export const MODEL_EXTENSIONS = new Set(['.glb', '.gltf'])
export const TEXTURE_EXTENSIONS = new Set(['.png', '.jpg', '.jpeg', '.webp'])
export const ALL_ALLOWED_EXTENSIONS = new Set([...MODEL_EXTENSIONS, ...TEXTURE_EXTENSIONS])
/** Extensions tracked by Git LFS (must match .gitattributes) */
export const LFS_EXTENSIONS = new Set(['.glb', '.gltf', '.png', '.jpg', '.jpeg', '.webp'])
export const REQUIRED_TEXTURES = ['roughness', 'normal', 'metalness', 'color', 'displace'] as const
export const VALID_DESTINATIONS = new Set<string>([