1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-22 17:01:58 +01:00

fix: use .drone.yml as default pipeline file (#219)

use .drone.yml as default pipeline file if no pipeline file is passed
This commit is contained in:
Kamesh Sampath 2022-09-06 14:54:13 +05:30 committed by GitHub
parent dcb1602f90
commit a5ac6d2330
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored

@ -1,3 +1,4 @@
drone/drone
release
.env
.vscode

@ -48,6 +48,10 @@ type execCommand struct {
}
func mapOldToExecCommand(input *cli.Context) (returnVal *execCommand) {
pipelineFile := input.Args().First()
if pipelineFile == "" {
pipelineFile = ".drone.yml"
}
returnVal = &execCommand{
Flags: &Flags{
Build: &drone.Build{
@ -74,7 +78,7 @@ func mapOldToExecCommand(input *cli.Context) (returnVal *execCommand) {
Host: input.String("instance"),
},
},
Source: input.Args().First(),
Source: pipelineFile,
Include: input.StringSlice("include"),
Exclude: input.StringSlice("exclude"),
Clone: input.Bool("clone"),