Rename configuration selection to overlays
This commit is contained in:
@@ -16,7 +16,7 @@ func runConfigEffective(args []string, stdout, stderr io.Writer, opts Options) i
|
||||
fs := flag.NewFlagSet("config effective", flag.ContinueOnError)
|
||||
fs.SetOutput(io.Discard)
|
||||
configPath := fs.String("config", "", "config file path")
|
||||
profile := fs.String("config-profile", "", "configuration profile")
|
||||
overlay := fs.String("config-overlay", "", "configuration overlay")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 2
|
||||
@@ -25,7 +25,7 @@ func runConfigEffective(args []string, stdout, stderr io.Writer, opts Options) i
|
||||
fmt.Fprintf(stderr, "notarius: unexpected argument %q\n", fs.Arg(0))
|
||||
return 2
|
||||
}
|
||||
loaded, _, err := loadConfigKit(*configPath, *profile, nil, opts)
|
||||
loaded, _, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
@@ -41,7 +41,7 @@ func runConfigExplain(args []string, stdout, stderr io.Writer, opts Options) int
|
||||
fs := flag.NewFlagSet("config explain", flag.ContinueOnError)
|
||||
fs.SetOutput(io.Discard)
|
||||
configPath := fs.String("config", "", "config file path")
|
||||
profile := fs.String("config-profile", "", "configuration profile")
|
||||
overlay := fs.String("config-overlay", "", "configuration overlay")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 2
|
||||
@@ -56,7 +56,7 @@ func runConfigExplain(args []string, stdout, stderr io.Writer, opts Options) int
|
||||
fmt.Fprintf(stderr, "notarius: %q is not a canonical JSON Pointer\n", pointer)
|
||||
return 2
|
||||
}
|
||||
loaded, _, err := loadConfigKit(*configPath, *profile, nil, opts)
|
||||
loaded, _, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
@@ -72,7 +72,7 @@ func runConfigValidate(args []string, stdout, stderr io.Writer, opts Options) in
|
||||
fs := flag.NewFlagSet("config validate", flag.ContinueOnError)
|
||||
fs.SetOutput(io.Discard)
|
||||
configPath := fs.String("config", "", "config file path")
|
||||
profile := fs.String("config-profile", "", "configuration profile")
|
||||
overlay := fs.String("config-overlay", "", "configuration overlay")
|
||||
pipelineID := fs.String("pipeline", "", "pipeline ID")
|
||||
onlyRaw := fs.String("only", "", "comma-separated artifact lanes")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
@@ -92,7 +92,7 @@ func runConfigValidate(args []string, stdout, stderr io.Writer, opts Options) in
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 2
|
||||
}
|
||||
loaded, path, err := loadConfigKit(*configPath, *profile, nil, opts)
|
||||
loaded, path, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
@@ -123,7 +123,7 @@ func runPipelinesList(args []string, stdout, stderr io.Writer, opts Options) int
|
||||
fs := flag.NewFlagSet("pipelines list", flag.ContinueOnError)
|
||||
fs.SetOutput(io.Discard)
|
||||
configPath := fs.String("config", "", "config file path")
|
||||
profile := fs.String("config-profile", "", "configuration profile")
|
||||
overlay := fs.String("config-overlay", "", "configuration overlay")
|
||||
jsonOutput := fs.Bool("json", false, "write JSON output")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
@@ -133,7 +133,7 @@ func runPipelinesList(args []string, stdout, stderr io.Writer, opts Options) int
|
||||
fmt.Fprintf(stderr, "notarius: unexpected argument %q\n", fs.Arg(0))
|
||||
return 2
|
||||
}
|
||||
loaded, _, err := loadConfigKit(*configPath, *profile, nil, opts)
|
||||
loaded, _, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user