feat: add option to specify subdirectory in repo to use
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/man Pipeline was successful
ci/woodpecker/pr/docker Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/man Pipeline was successful
ci/woodpecker/pr/docker Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
This commit is contained in:
parent
a48358fd75
commit
1ce7b9d571
14 changed files with 120 additions and 28 deletions
|
|
@ -82,6 +82,11 @@ pub fn cmd() cli.Command {
|
|||
description: "Which branch to clone; only applies to kind 'git'."
|
||||
flag: cli.FlagType.string
|
||||
},
|
||||
cli.Flag{
|
||||
name: 'path'
|
||||
description: 'Subdirectory inside Git repository to use.'
|
||||
flag: cli.FlagType.string
|
||||
},
|
||||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
|
|
@ -92,6 +97,7 @@ pub fn cmd() cli.Command {
|
|||
url: cmd.args[0]
|
||||
repo: cmd.args[1]
|
||||
branch: cmd.flags.get_string('branch') or { '' }
|
||||
path: cmd.flags.get_string('path') or { '' }
|
||||
}
|
||||
|
||||
raw := cmd.flags.get_bool('raw')!
|
||||
|
|
@ -159,6 +165,11 @@ pub fn cmd() cli.Command {
|
|||
description: 'Kind of target.'
|
||||
flag: cli.FlagType.string
|
||||
},
|
||||
cli.Flag{
|
||||
name: 'path'
|
||||
description: 'Subdirectory inside Git repository to use.'
|
||||
flag: cli.FlagType.string
|
||||
},
|
||||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
|
|
|
|||
Reference in a new issue