-
Notifications
You must be signed in to change notification settings - Fork 7
Delta Updates for mods hosted at Github
- when you extract the mod archive, make sure that every mod have an extra top-level directory
Simply add mod metadata file and fill the 'Download = ' keyword with the link to your GitHub repository: https://github.com/ALIENQuake/ProjectInfinity/wiki/Adding-metadata-for-mod
If you do not use releases, everything below doesn't apply to you but you are encouraged to read this anyway.
tl;dr If you use GitHub releases to ship new versions, after creating a release do not edit it in any way. Yes, that includes manually replacing mod packages or manipulating tags. You can change the title and description.
If the mod is hosted on GitHub and you use releases to ship new versions, there are some things you must not do because bad things will happen.
In order to not break things, simply follow the usual Git + GitHub workflow:
- Update tp2 VERSION keyword, update readme with version, and changelog
- Create final local commit with all 'ready-to-go' changes
- Push local commits into a remote repository
- Optionally, create mod packages that you will later add to the release or use automated tools
- Create release via the GitHub web interface (or via tools) with the same tag as VERSION
This is the end of the road. After publishing release, you cannot:
- add other tags to the same release
- remove or replace existing tags
- replace mod packages with new ones that contain changes
If you have done ANY modification to the local files, especially if you discover mistakes, you must repeat all of the 'usual Git + GitHub workflow' steps above.
Helpful tools:
There are new tools that will ensure that not only will save you time but ensure you will follow this workflow every time and save you from trivial mistakes.
Mod Release - among other things, it prevents creating "2.0.0" release when your mod version is "1.8.0", prevents creating a new release if there are uncommitted file modifications and prevent creating a new release if the same release already exists.
Infinity Auto Packager - among other things, it prevents creating mod packages that might contain locally uncommitted changes
Delta Updates will only download mod changes, not the whole mod again.
Because it's GitHub-based, it offers stability and consistency. It's impossible to download partial
files: you either download it correctly or don't download it at all, it's how git itself works internally.
- the update process doesn't modify mods inside the game directory, only the directory where the user has extracted it
- update process can be only initiated by the user himself, in order to not break the desired install state
- custom user-created files inside the mod folder will be removed
- if the mod doesn't have any releases or prerelease, offer updates for each new commit
- if the mod has even one release, offer an update only if a new release was published
- if the mod has only prereleases, offer an update only if a new prerelease was published
- if the mod has both releases and prereleases, offer updates for releases only, do not offer the update for new prereleases unless there is a global option "Allow for prereleases" enabled