feat: add option to specify subdirectory in repo to use

This commit is contained in:
Jef Roosens 2022-12-16 11:21:28 +01:00
parent a48358fd75
commit 1ce7b9d571
Signed by untrusted user: Jef Roosens
GPG key ID: B75D4F293C7052DB
14 changed files with 120 additions and 28 deletions

View file

@ -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')!