AcidWeb/CurseBreaker

Git based update flow

Closed this issue · 3 comments

After trying to get some addons to work that don't have a packaged release (for example: Details) and currently working around this by using a git client to just pull the repo I thought maybe it is possible to implement a git based update flow.
The idea is that you can supply the command as usual install [URL] but with an added parameter of: -g
It would then do a git clone of the repo into the addons directory.
The reasoning behind this is that some addons do have their source public on Github but don't have packaged releases as well as not having released their addon anywhere except on CurseForge.

So to reiterate the flow I am thinking about would be something like:

  • User uses the command: install [URL] -g
  • CurseBreaker checks if repo exists and is valid.
  • If the repo exists CurseBreaker would clone the main branch into the addons folder.
  • As an extra step we could check for the latest tag placed on the main branch and then checkout the commit with that tag.

I do think there are some edge cases/implementation details I'm not thinking of at the moment and would therefore like to see if this would be a feature you would want in CurseBreaker and/or if there are alternatives/options you can think of.

Lack of support for bare Git repositories is not an oversight but a conscious design decision. There are good reasons why CB and other popular third-party updaters have not implemented this feature.

In the current ecosystem state, A LOT of addon repositories are in a form that can't be used directly or should not be used directly. I'm fully aware that there is a group of power users that would use bare repository support prudently but if I have a choice between providing this feature for power users or disallowing less informed players to use the addon version which should not be used yet (or can't be used at all) I prefer to minimize potential headaches for authors. Additionally repositories that provide proper packages are a confirmation for us that the author wishes his work to be published in this form.

PS. Details will be available on other sites Soon™
PPS. If you want to make something for yourself CB already support bare repositories with GitHubAddonRaw class. It is used to support dev version of few addons.

That is an understandable design choice. Reducing potential headaches in that way is something I hadn't thought of yet.
My though process came from the fact that some addons use their releases in the same way as Shadow & Light does (example: MogIt), and some use releases but only with a source code zip file instead of a packaged release. (example: RCLootCouncil2)
But the extra confirmation as you said is a good thing to have to prevent unintentional usages of said addon.

I will make some of the dev routes for myself using the GitHubAddonRaw class as I personally prefer to have all my addons through a single interface instead of using 2 or 3 applications.

Thank you for the explanation of the design decision and the pointer on being able to implement it for myself if I wish to.

In this case from technical standpoint a GH release without packages is the same as bare repo.