Add a skip field to the repository configuration

This commit is contained in:
Mikołaj Pęczkowski 2021-11-08 20:34:32 +01:00
parent 62dadc53bf
commit 19e68df732
4 changed files with 74 additions and 2 deletions

View file

@ -53,6 +53,10 @@ func ParseCliArguments(name, description string, arguments []string) (CliArgumen
Help: "Determine how many tasks can run simultaneously",
})
ignoreSkipped := parser.Flag("", "ignore-skip-flag", &argparse.Options{
Help: "Run selected command for all repositories with ignoring the skip flag",
})
if err := parser.Parse(arguments); err != nil {
return CliArguments{}, errors.New(parser.Usage("Please follow this help"))
}
@ -74,5 +78,6 @@ func ParseCliArguments(name, description string, arguments []string) (CliArgumen
LimitToName: *limitName,
LimitToTags: *limitTags,
Routines: *limitRoutines,
IgnoreSkipped: *ignoreSkipped,
}, nil
}

View file

@ -6,10 +6,11 @@ type Configuration struct {
}
type RepositoryConfig struct {
Name string `yaml:",omitempty"`
Src string `yaml:",omitempty"`
Name string `yaml:",omitempty"`
Src string
Dest string `yaml:",omitempty"`
Tags []string `yaml:",omitempty"`
Skip bool
}
type CliArguments struct {
@ -21,4 +22,5 @@ type CliArguments struct {
LimitToName string
LimitToTags []string
Routines int
IgnoreSkipped bool
}