mirror of
https://github.com/thegeeklab/drone-yaml.git
synced 2024-06-15 22:30:50 +02:00
add repository address to convert command
This commit is contained in:
parent
e8b24d482c
commit
c50000a465
2
main.go
2
main.go
|
@ -46,6 +46,7 @@ var (
|
||||||
convert = kingpin.Command("convert", "convert the yaml file")
|
convert = kingpin.Command("convert", "convert the yaml file")
|
||||||
convertSave = convert.Flag("save", "save result to source").Short('s').Bool()
|
convertSave = convert.Flag("save", "save result to source").Short('s').Bool()
|
||||||
convertFile = convert.Arg("source", "source file location").Default(".drone.yml").File()
|
convertFile = convert.Arg("source", "source file location").Default(".drone.yml").File()
|
||||||
|
convertAddr = convert.Flag("addr", "remote repository address").String()
|
||||||
|
|
||||||
lint = kingpin.Command("lint", "lint the yaml file")
|
lint = kingpin.Command("lint", "lint the yaml file")
|
||||||
lintPriv = lint.Flag("privileged", "privileged mode").Short('p').Bool()
|
lintPriv = lint.Flag("privileged", "privileged mode").Short('p').Bool()
|
||||||
|
@ -107,6 +108,7 @@ func runConvert() error {
|
||||||
}
|
}
|
||||||
m := converter.Metadata{
|
m := converter.Metadata{
|
||||||
Filename: f.Name(),
|
Filename: f.Name(),
|
||||||
|
URL: *convertAddr,
|
||||||
}
|
}
|
||||||
b, err := converter.Convert(d, m)
|
b, err := converter.Convert(d, m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user