File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ import (
4545var Command = & cli.Command {
4646 Name : "exec" ,
4747 Usage : "execute a local pipeline" ,
48- ArgsUsage : "[path/to/.woodpecker.yml ]" ,
48+ ArgsUsage : "[path/to/.woodpecker.yaml ]" ,
4949 Action : run ,
5050 Flags : append (common .GlobalFlags , flags ... ),
5151}
@@ -66,7 +66,7 @@ func execDir(c *cli.Context, dir string) error {
6666 }
6767
6868 // check if it is a regular file (not dir)
69- if info .Mode ().IsRegular () && strings .HasSuffix (info .Name (), ".yml" ) {
69+ if info .Mode ().IsRegular () && ( strings .HasSuffix (info .Name (), ".yaml" ) || strings . HasSuffix ( info . Name (), ". yml") ) {
7070 fmt .Println ("#" , info .Name ())
7171 _ = runExec (c , path , repoPath ) // TODO: should we drop errors or store them and report back?
7272 fmt .Println ("" )
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import (
1616var Command = & cli.Command {
1717 Name : "lint" ,
1818 Usage : "lint a pipeline configuration file" ,
19- ArgsUsage : "[path/to/.woodpecker.yml ]" ,
19+ ArgsUsage : "[path/to/.woodpecker.yaml ]" ,
2020 Action : lint ,
2121 Flags : common .GlobalFlags ,
2222}
@@ -33,7 +33,7 @@ func lintDir(c *cli.Context, dir string) error {
3333 }
3434
3535 // check if it is a regular file (not dir)
36- if info .Mode ().IsRegular () && strings .HasSuffix (info .Name (), ".yml" ) {
36+ if info .Mode ().IsRegular () && ( strings .HasSuffix (info .Name (), ".yaml" ) || strings . HasSuffix ( info . Name (), ". yml") ) {
3737 fmt .Println ("#" , info .Name ())
3838 if err := lintFile (c , path ); err != nil {
3939 errorStrings = append (errorStrings , err .Error ())
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ func TestFetch(t *testing.T) {
114114 expectedError : false ,
115115 },
116116 {
117- name : "Default config check .woodpecker.yml before .woodpecker.yaml " ,
117+ name : "Default config check .woodpecker.yaml before .woodpecker.yml " ,
118118 repoConfig : "" ,
119119 files : []file {{
120120 name : ".woodpecker.yaml" ,
@@ -124,7 +124,7 @@ func TestFetch(t *testing.T) {
124124 data : dummyData ,
125125 }},
126126 expectedFileNames : []string {
127- ".woodpecker.yml " ,
127+ ".woodpecker.yaml " ,
128128 },
129129 expectedError : false ,
130130 },
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ var PrivilegedPlugins = []string{
2626// folders are indicated by supplying a trailing /
2727var DefaultConfigOrder = [... ]string {
2828 ".woodpecker/" ,
29- ".woodpecker.yml" ,
3029 ".woodpecker.yaml" ,
30+ ".woodpecker.yml" ,
3131 ".drone.yml" ,
3232}
3333
Original file line number Diff line number Diff line change 8181 "success" : " Repository settings updated" ,
8282 "pipeline_path" : {
8383 "path" : " Pipeline path" ,
84- "default" : " By default: .woodpecker/*.yml -> .woodpecker.yml -> .drone.yml" ,
84+ "default" : " By default: .woodpecker/*.{'{yaml, yml}'} -> .woodpecker.yaml -> .woodpecker.yml -> .drone.yml" ,
8585 "desc" : " Path to your pipeline config (for example {0}). Folders should end with a {1}." ,
8686 "desc_path_example" : " my/path/"
8787 },
You can’t perform that action at this time.
0 commit comments