-
Notifications
You must be signed in to change notification settings - Fork 56
/
upgrade.go
42 lines (38 loc) · 1.06 KB
/
upgrade.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (C) 2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package upgradecmd
import (
"fmt"
"github.com/ava-labs/avalanche-cli/pkg/application"
"github.com/spf13/cobra"
)
var app *application.Avalanche
// avalanche subnet vm
func NewCmd(injectedApp *application.Avalanche) *cobra.Command {
cmd := &cobra.Command{
Use: "upgrade",
Short: "Upgrade your Subnets",
Long: `The subnet upgrade command suite provides a collection of tools for
updating your developmental and deployed Subnets.`,
Run: func(cmd *cobra.Command, args []string) {
err := cmd.Help()
if err != nil {
fmt.Println(err)
}
},
}
app = injectedApp
// subnet upgrade vm
cmd.AddCommand(newUpgradeVMCmd())
// subnet upgrade generate
cmd.AddCommand(newUpgradeGenerateCmd())
// subnet upgrade import
cmd.AddCommand(newUpgradeImportCmd())
// subnet upgrade export
cmd.AddCommand(newUpgradeExportCmd())
// subnet upgrade print
cmd.AddCommand(newUpgradePrintCmd())
// subnet upgrade apply
cmd.AddCommand(newUpgradeApplyCmd())
return cmd
}