Files
truecharts/clustertool/cmd/charts_deps.go
T
Kjeld Schouten 1c28a12789 chore: fix links
2025-09-07 14:26:19 +02:00

37 lines
941 B
Go

package cmd
import (
"strings"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/trueforge-org/truecharts/clustertool/pkg/charts/deps"
"github.com/trueforge-org/truecharts/clustertool/pkg/helper"
)
var chartsDepsLongHelp = strings.TrimSpace(`
`)
var depsCmd = &cobra.Command{
Use: "deps",
Short: "Download, Update and Verify Helm dependencies",
Long: chartsDepsLongHelp,
Example: "clustertool charts deps <chart> <chart> <chart>",
Run: func(cmd *cobra.Command, args []string) {
if err := deps.LoadGPGKey(); err != nil {
log.Fatal().Err(err).Msg("failed to load gpg key")
}
// Specify the mode (SyncMode or AsyncMode)
mode := helper.SyncMode // Change to helper.SyncMode for synchronous processing
if err := helper.WalkCharts(args, deps.DownloadDeps, "", mode); err != nil {
log.Fatal().Err(err).Msg("failed to update Chart.yaml")
}
},
}
func init() {
charts.AddCommand(depsCmd)
}