diff --git a/cli/exec/exec.go b/cli/exec/exec.go index 7a1b1f64c..26287d1d8 100644 --- a/cli/exec/exec.go +++ b/cli/exec/exec.go @@ -45,7 +45,7 @@ import ( var Command = &cli.Command{ Name: "exec", Usage: "execute a local pipeline", - ArgsUsage: "[path/to/.woodpecker.yml]", + ArgsUsage: "[path/to/.woodpecker.yaml]", Action: run, Flags: append(common.GlobalFlags, flags...), } @@ -66,7 +66,7 @@ func execDir(c *cli.Context, dir string) error { } // check if it is a regular file (not dir) - if info.Mode().IsRegular() && strings.HasSuffix(info.Name(), ".yml") { + if info.Mode().IsRegular() && (strings.HasSuffix(info.Name(), ".yaml") || strings.HasSuffix(info.Name(), ".yml")) { fmt.Println("#", info.Name()) _ = runExec(c, path, repoPath) // TODO: should we drop errors or store them and report back? fmt.Println("") diff --git a/cli/lint/lint.go b/cli/lint/lint.go index a4bf7f64e..c8efeca9f 100644 --- a/cli/lint/lint.go +++ b/cli/lint/lint.go @@ -16,7 +16,7 @@ import ( var Command = &cli.Command{ Name: "lint", Usage: "lint a pipeline configuration file", - ArgsUsage: "[path/to/.woodpecker.yml]", + ArgsUsage: "[path/to/.woodpecker.yaml]", Action: lint, Flags: common.GlobalFlags, } @@ -33,7 +33,7 @@ func lintDir(c *cli.Context, dir string) error { } // check if it is a regular file (not dir) - if info.Mode().IsRegular() && strings.HasSuffix(info.Name(), ".yml") { + if info.Mode().IsRegular() && (strings.HasSuffix(info.Name(), ".yaml") || strings.HasSuffix(info.Name(), ".yml")) { fmt.Println("#", info.Name()) if err := lintFile(c, path); err != nil { errorStrings = append(errorStrings, err.Error()) diff --git a/server/forge/configFetcher_test.go b/server/forge/configFetcher_test.go index 775455689..c962909ac 100644 --- a/server/forge/configFetcher_test.go +++ b/server/forge/configFetcher_test.go @@ -114,7 +114,7 @@ func TestFetch(t *testing.T) { expectedError: false, }, { - name: "Default config check .woodpecker.yml before .woodpecker.yaml", + name: "Default config check .woodpecker.yaml before .woodpecker.yml", repoConfig: "", files: []file{{ name: ".woodpecker.yaml", @@ -124,7 +124,7 @@ func TestFetch(t *testing.T) { data: dummyData, }}, expectedFileNames: []string{ - ".woodpecker.yml", + ".woodpecker.yaml", }, expectedError: false, }, diff --git a/shared/constant/constant.go b/shared/constant/constant.go index 41cd3cc83..49cf44d10 100644 --- a/shared/constant/constant.go +++ b/shared/constant/constant.go @@ -26,8 +26,8 @@ var PrivilegedPlugins = []string{ // folders are indicated by supplying a trailing / var DefaultConfigOrder = [...]string{ ".woodpecker/", - ".woodpecker.yml", ".woodpecker.yaml", + ".woodpecker.yml", ".drone.yml", } diff --git a/web/src/assets/locales/en.json b/web/src/assets/locales/en.json index de700a15e..fdc2469b5 100644 --- a/web/src/assets/locales/en.json +++ b/web/src/assets/locales/en.json @@ -81,7 +81,7 @@ "success": "Repository settings updated", "pipeline_path": { "path": "Pipeline path", - "default": "By default: .woodpecker/*.yml -> .woodpecker.yml -> .drone.yml", + "default": "By default: .woodpecker/*.{'{yaml,yml}'} -> .woodpecker.yaml -> .woodpecker.yml -> .drone.yml", "desc": "Path to your pipeline config (for example {0}). Folders should end with a {1}.", "desc_path_example": "my/path/" },