ipedrazas / drone-helm

Helm (Kubernetes) plugin for drone.io
MIT License
120 stars 90 forks source link

support chart version with "--version" flag #38

Closed alexei-led closed 7 years ago

alexei-led commented 7 years ago

allow specifying chart version, use the latest chart version if not specified

hokichaio commented 7 years ago

I got this following error, maybe VERSION has already taken from somewhere?

helm plugin flag redefined: version
panic: helm plugin flag redefined: version
goroutine 1 [running]:
flag.(*FlagSet).Var(0xc42001c240, 0x690d40, 0xc42000e694, 0x5c8436, 0x7, 0x5c9ad5, 0x11)
    /usr/local/go/src/flag/flag.go:793 +0x420
flag.(*FlagSet).BoolVar(0xc42001c240, 0xc42000e694, 0x5c8436, 0x7, 0x4c3800, 0x5c9ad5, 0x11)
    /usr/local/go/src/flag/flag.go:566 +0x70
flag.(*FlagSet).Bool(0xc42001c240, 0x5c8436, 0x7, 0x0, 0x5c9ad5, 0x11, 0x7)
    /usr/local/go/src/flag/flag.go:579 +0x7f
drone-helm/vendor/github.com/urfave/cli.BoolFlag.ApplyWithError.func1(0x5c8436, 0x7)
    /go/src/drone-helm/vendor/github.com/urfave/cli/flag.go:352 +0xa7
drone-helm/vendor/github.com/urfave/cli.eachName(0x5c8436, 0xa, 0xc42003b628)
    /go/src/drone-helm/vendor/github.com/urfave/cli/flag.go:94 +0xb5
drone-helm/vendor/github.com/urfave/cli.BoolFlag.ApplyWithError(0x5c8436, 0xa, 0x5c9ad5, 0x11, 0x0, 0x0, 0x0, 0x0, 0xc42001c240, 0x1, ...)
    /go/src/drone-helm/vendor/github.com/urfave/cli/flag.go:353 +0xef
drone-helm/vendor/github.com/urfave/cli.(*BoolFlag).ApplyWithError(0xc4200165c0, 0xc42001c240, 0xc4200165c0, 0x7f25e6a180f8)
    <autogenerated>:21 +0x66
drone-helm/vendor/github.com/urfave/cli.flagSet(0x5c8737, 0xb, 0xc420084000, 0x16, 0x28, 0xc420076040, 0x5c6bbd, 0x1)
    /go/src/drone-helm/vendor/github.com/urfave/cli/flag.go:80 +0xfa
drone-helm/vendor/github.com/urfave/cli.(*App).Run(0xc420001ba0, 0xc42000e200, 0x1, 0x1, 0x0, 0x0)
    /go/src/drone-helm/vendor/github.com/urfave/cli/app.go:181 +0x174
main.main()
    /go/src/drone-helm/main.go:122 +0x103f
alexei-led commented 7 years ago

Oh, I see. The issue is related to urfave/cli package. It adds version flag automatically. I will rename it to chart-version to avoid this conflict.