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:
parent
dcb1602f90
commit
a5ac6d2330
1
.gitignore
vendored
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"),
|
||||
|
Loading…
Reference in New Issue
Block a user