Repository navigation
Download several at once: pick mods, get one ZIP - #17
Merged
Merged
Conversation
A new section on the hub (#bundle) lets a visitor tick mods and download one timbermods-mods.zip with a folder for each, plus a short Timbermods.txt guide. Only one of the two BeaverBuddies mods can be picked; Harmony and Mod Settings are never bundled. GitHub doesn't let a page fetch release downloads, so refresh-downloads.yml keeps the hub's own copies on the `downloads` branch (hourly, and when the page or scripts change): update-downloads.mjs picks the release each Download button offers (same rule as site.js), rewrites it into a plain ZIP with one top folder, and lists it in manifest.json with its SHA-256. The branch is one fresh commit each time, so it never grows. The page reads the copies from raw.githubusercontent.com, checks each checksum and joins them with zipmerge.js without unpacking. Tests: 20/20 (five new: joining, duplicate files, one top folder, same release as the buttons, the mirror script). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new Download several at once section on the hub (
#bundle, between the mod boards and the install guide, linked from the opening line and install step 1).What a visitor sees
timbermods-mods.zip, with one folder per mod (extract intoDocuments\Timberborn\Mods) and a shortTimbermods.txtlisting versions, requirements and release notes.How it works
.github/workflows/refresh-downloads.ymlkeeps the hub's own copies on adownloadsbranch. It runs hourly at :37, after the release snapshot, and whenever the page or these scripts change.scripts/update-downloads.mjspicks, for each mod, the release its Download button offers (the same rule assite.js, and a test compares the two). It rewrites that ZIP into a plain form with exactly one top folder, and no two mods may share a folder. It lists each copy inmanifest.jsonwith its SHA-256.raw.githubusercontent.com, which allows it. It checks every SHA-256, then joins the ZIPs withassets/zipmerge.jswithout unpacking them. Nothing is sent anywhere.Checked
node scripts/test-site.mjs: 20/20, with five new checks (joining, duplicate files refused, one top folder, same release as the buttons, the mirror script end to end with a fake GitHub).After merging, the push trigger creates the
downloadsbranch. Until then, the section says the list didn't load and points to each mod's own button.🤖 Generated with Claude Code