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

View File

@@ -9,8 +9,8 @@ import (
"os"
)
// updateCmd represents the update command
var updateCmd = &cobra.Command{
// UpdateCmd represents the update command
var UpdateCmd = &cobra.Command{
Use: "update [name]",
Short: "Update an external file (or all external files) in the modpack",
Aliases: []string{"upgrade"},
@@ -210,8 +210,8 @@ var updateCmd = &cobra.Command{
}
func init() {
rootCmd.AddCommand(updateCmd)
rootCmd.AddCommand(UpdateCmd)
updateCmd.Flags().BoolP("all", "a", false, "Update all external files")
_ = viper.BindPFlag("update.all", updateCmd.Flags().Lookup("all"))
UpdateCmd.Flags().BoolP("all", "a", false, "Update all external files")
_ = viper.BindPFlag("update.all", UpdateCmd.Flags().Lookup("all"))
}