mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 08:47:35 +08:00
changed requiredversion to requiredversions
This commit is contained in:
@@ -24,7 +24,8 @@ func UpdateClientConfig() {
|
||||
//update any new fields
|
||||
configChanged := false
|
||||
for _, u := range upgrades.Upgrades {
|
||||
if cfg.Node.Version == u.RequiredVersion {
|
||||
if ncutils.StringSliceContains(u.RequiredVersions, cfg.Node.Version) {
|
||||
logger.Log(0, "upgrading node", cfg.Node.Name, "on network", cfg.Node.Network, "from", cfg.Node.Version, "to", u.NewVersion)
|
||||
upgrades.UpgradeFunction(u.OP)(&cfg)
|
||||
cfg.Node.Version = u.NewVersion
|
||||
configChanged = true
|
||||
|
@@ -7,7 +7,7 @@ type UpgradeFunction func(*config.ClientConfig)
|
||||
|
||||
// UpgradeInfo - struct for holding upgrade info
|
||||
type UpgradeInfo struct {
|
||||
RequiredVersion string
|
||||
NewVersion string
|
||||
OP UpgradeFunction
|
||||
RequiredVersions []string
|
||||
NewVersion string
|
||||
OP UpgradeFunction
|
||||
}
|
||||
|
@@ -3,9 +3,9 @@ package upgrades
|
||||
import "github.com/gravitl/netmaker/netclient/config"
|
||||
|
||||
var upgrade0145 = UpgradeInfo{
|
||||
RequiredVersion: "0.14.4",
|
||||
NewVersion: "0.14.5",
|
||||
OP: update0145,
|
||||
RequiredVersions: []string{"0.14.1", "0.14.2", "0.14.3", "0.14.4"},
|
||||
NewVersion: "0.14.5",
|
||||
OP: update0145,
|
||||
}
|
||||
|
||||
func update0145(cfg *config.ClientConfig) {
|
||||
|
Reference in New Issue
Block a user