gorilla-devs / ferium

Fast and multi-source CLI program for managing Minecraft mods and modpacks from Modrinth, CurseForge, and GitHub Releases
Mozilla Public License 2.0
1.16k stars 49 forks source link

Support for git backup? #174

Open JustSimplyKyle opened 2 years ago

JustSimplyKyle commented 2 years ago

The problem

Currently the way that ferium handles for deleting upgrading, or any modifications to the mod folder, it will move any mods that aren't the newest/not in profile into an .old directory. Which in my IMHO is perfect for non technical users. What I wish for is a way to use a git to "control" the mods. When ferium upgrade, smth like update iris, remove lambdabttergrass can be committed into git.

My solutions

Alias ferium upgrade to my own script that commits all the stuff that ferium does. The caveat for this is, git commits are not very descriptive.

theRookieCoder commented 2 years ago

This might result in huge .git folders.

It shouldn't be too hard to sprinkle a few git calls here and there.

soupglasses commented 2 years ago

You can look into https://github.com/packwiz/packwiz

Its spessifically made to be git based. Ferium is a great tool for quick mod installations and updates on a client side. But it would require a good bit of work to make it work nicely in a git repository.

Hope that helps!

soupglasses commented 2 years ago

This might result in huge .git folders.

It shouldn't be too hard to sprinkle a few git calls here and there.

Another solution could be to only publish the config.json file to git, and pull that in with a ferium --config-file=config.json upgrade call.

Maybe adding a update call to only upgrade to the package versions defined in a config.json file could be smart? It would require putting in the version tags to the config.json file and reading them. And add in an optional ferium upgrade <mod-id>... to let you selectively upgrade only a couple of the mods?

soupglasses commented 2 years ago

Opened the issue #176 specifically about my comment above, as it is not what this issue is asking about directly.

DarkShadow44 commented 2 years ago

I don't see the need to git integration. I also track my mods with git, and when I confirm that the upgrade was successful and my world still loads, I commit it. Can't really automate that testing part though.

theRookieCoder commented 2 years ago

That's how I 'developed' my modpack too, it might probably easier to create some sort of wrapper script

JustSimplyKyle commented 2 years ago

Currently my bash one-liner "wrapper script" alias ferium-acommit="ferium upgrade; git add *.jar; git commit-status" git commit-status from https://gist.github.com/erikw/654386d35ecfdb0354cd2b71763f19ae