Skip to content

Commit

Permalink
fix: local upgrade - add config save
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdand-weka committed Mar 27, 2024
1 parent 269f9e6 commit 35509f5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/cli/local/upgrade/run.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package upgrade

import (
"fmt"
"os"

"github.com/spf13/cobra"

"github.com/weka/gohomecli/internal/local/bundle"
"github.com/weka/gohomecli/internal/local/chart"
"github.com/weka/gohomecli/internal/local/config"
config_v1 "github.com/weka/gohomecli/internal/local/config/v1"
"github.com/weka/gohomecli/internal/local/k3s"
)
Expand Down Expand Up @@ -62,7 +64,12 @@ func runUpgrade(cmd *cobra.Command, args []string) error {
Config: &upgradeConfig.Configuration,
}

return chart.Upgrade(cmd.Context(), helmOptions, upgradeConfig.Debug)
err = chart.Upgrade(cmd.Context(), helmOptions, upgradeConfig.Debug)
if err != nil {
return fmt.Errorf("chart upgrade: %w", err)
}

return config.SaveV1(config.CLIConfig, upgradeConfig.Configuration)
}

func readTLS(certFile, keyFile string, config *config_v1.Configuration) error {
Expand Down

0 comments on commit 35509f5

Please sign in to comment.