mirror of
https://github.com/drone/drone-cli.git
synced 2024-11-23 01:11:57 +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
|
drone/drone
|
||||||
release
|
release
|
||||||
.env
|
.env
|
||||||
|
.vscode
|
@ -48,6 +48,10 @@ type execCommand struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func mapOldToExecCommand(input *cli.Context) (returnVal *execCommand) {
|
func mapOldToExecCommand(input *cli.Context) (returnVal *execCommand) {
|
||||||
|
pipelineFile := input.Args().First()
|
||||||
|
if pipelineFile == "" {
|
||||||
|
pipelineFile = ".drone.yml"
|
||||||
|
}
|
||||||
returnVal = &execCommand{
|
returnVal = &execCommand{
|
||||||
Flags: &Flags{
|
Flags: &Flags{
|
||||||
Build: &drone.Build{
|
Build: &drone.Build{
|
||||||
@ -74,7 +78,7 @@ func mapOldToExecCommand(input *cli.Context) (returnVal *execCommand) {
|
|||||||
Host: input.String("instance"),
|
Host: input.String("instance"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Source: input.Args().First(),
|
Source: pipelineFile,
|
||||||
Include: input.StringSlice("include"),
|
Include: input.StringSlice("include"),
|
||||||
Exclude: input.StringSlice("exclude"),
|
Exclude: input.StringSlice("exclude"),
|
||||||
Clone: input.Bool("clone"),
|
Clone: input.Bool("clone"),
|
||||||
|
Loading…
Reference in New Issue
Block a user