updated sync flag and related logs [breaking change] (#402)

* updated sync flag and related logs [breaking change]
* fixed typo in sync flag name
* and the last typo fix...
This commit is contained in:
Zack Brady
2025-02-05 08:54:54 -05:00
committed by GitHub
parent 938914ba5c
commit ff144b1180
6 changed files with 43 additions and 38 deletions

View File

@@ -1,10 +1,13 @@
package flags
import "github.com/spf13/cobra"
import (
"github.com/spf13/cobra"
"hauler.dev/go/hauler/pkg/consts"
)
type SyncOpts struct {
*StoreRootOpts
ContentFiles []string
FileName []string
Key string
Products []string
Platform string
@@ -15,7 +18,7 @@ type SyncOpts struct {
func (o *SyncOpts) AddFlags(cmd *cobra.Command) {
f := cmd.Flags()
f.StringSliceVarP(&o.ContentFiles, "files", "f", []string{}, "Location of content manifests (files)... i.e. --files ./rke2-files.yaml")
f.StringSliceVarP(&o.FileName, "filename", "f", []string{consts.DefaultHaulerManifestName}, "Specify the name of manifest(s) to sync")
f.StringVarP(&o.Key, "key", "k", "", "(Optional) Location of public key to use for signature verification")
f.StringSliceVar(&o.Products, "products", []string{}, "(Optional) Specify the product name to fetch collections from the product registry i.e. rancher=v2.8.5,rke2=v1.28.11+rke2r1")
f.StringVarP(&o.Platform, "platform", "p", "", "(Optional) Specify the platform of the image... i.e linux/amd64 (defaults to all)")