Finish native completion and retire legacy command machinery
This commit is contained in:
@@ -9,23 +9,6 @@ import (
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||
)
|
||||
|
||||
type artifactSelectionFlag struct {
|
||||
values []string
|
||||
}
|
||||
|
||||
func (f *artifactSelectionFlag) String() string {
|
||||
return strings.Join(f.values, ",")
|
||||
}
|
||||
|
||||
func (f *artifactSelectionFlag) Set(value string) error {
|
||||
f.values = append(f.values, value)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *artifactSelectionFlag) Normalize() ([]string, error) {
|
||||
return normalizeArtifactNames(f.values)
|
||||
}
|
||||
|
||||
func normalizeArtifactNames(values []string) ([]string, error) {
|
||||
if len(values) == 0 {
|
||||
return nil, nil
|
||||
@@ -51,11 +34,6 @@ func normalizeArtifactNames(values []string) ([]string, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func validateSelectedArtifacts(cfg *config.Config, selected []string) error {
|
||||
_, err := resolveEffectiveArtifacts(cfg, selected)
|
||||
return err
|
||||
}
|
||||
|
||||
func resolveEffectiveArtifacts(cfg *config.Config, selected []string) (artifacts.EffectiveArtifactSet, error) {
|
||||
if cfg == nil || cfg.Pipeline == nil || cfg.Pipeline.Scriptorium == nil {
|
||||
if len(selected) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user