mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 00:46:30 +00:00
cli exec: rename "--pipeline-files" to "--pipeline-changed-files" (#4142)
This commit is contained in:
parent
352201dbbd
commit
b59533a06f
2 changed files with 3 additions and 3 deletions
|
@ -235,7 +235,7 @@ var flags = []cli.Flag{
|
|||
&cli.StringFlag{
|
||||
Sources: cli.EnvVars("CI_PIPELINE_FILES"),
|
||||
Usage: "Set the metadata environment variable \"CI_PIPELINE_FILES\", either json formatted list of strings, or comma separated string list.",
|
||||
Name: "pipeline-files",
|
||||
Name: "pipeline-changed-files",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Sources: cli.EnvVars("CI_COMMIT_SHA"),
|
||||
|
|
|
@ -44,10 +44,10 @@ func metadataFromContext(_ context.Context, c *cli.Command, axis matrix.Axis) (m
|
|||
}
|
||||
|
||||
var changedFiles []string
|
||||
changedFilesRaw := c.String("pipeline-files")
|
||||
changedFilesRaw := c.String("pipeline-changed-files")
|
||||
if len(changedFilesRaw) != 0 && changedFilesRaw[0] == '[' {
|
||||
if err := json.Unmarshal([]byte(changedFilesRaw), &changedFiles); err != nil {
|
||||
return metadata.Metadata{}, fmt.Errorf("pipeline-files detected json but could not parse it: %w", err)
|
||||
return metadata.Metadata{}, fmt.Errorf("pipeline-changed-files detected json but could not parse it: %w", err)
|
||||
}
|
||||
} else {
|
||||
for _, file := range strings.Split(changedFilesRaw, ",") {
|
||||
|
|
Loading…
Reference in a new issue