Add migrate command (#207)

* Add base and loader command

* Support updating to latest

* Support explicit fabric versions

* Support explicit Forge version

* Support quilt

* Add support for updating Minecraft

* Add support for Forge recommended

* Fix Forge version sorting

* Various fixes

* Add documentation to the use

* More suggestions
This commit is contained in:
Matt Artist
2023-04-12 21:23:37 -04:00
committed by GitHub
parent 06f9204cd4
commit 539be71d11
9 changed files with 354 additions and 57 deletions

16
cmdshared/utils.go Normal file
View File

@@ -0,0 +1,16 @@
package cmdshared
import "strings"
func GetRawForgeVersion(version string) string {
var wantedVersion string
// Check if we have a "-" in the version
if strings.Contains(version, "-") {
// We have a mcVersion-loaderVersion format
// Strip the mcVersion
wantedVersion = strings.Split(version, "-")[1]
} else {
wantedVersion = version
}
return wantedVersion
}