Initial config for building the plugin itself

This commit is contained in:
Erin Call
2019-12-03 09:50:15 -08:00
parent 6b121047e1
commit ba75a9b1d8
7 changed files with 87 additions and 1 deletions

35
cmd/drone-helm/main.go Normal file
View File

@@ -0,0 +1,35 @@
package main
import (
"fmt"
"os"
"github.com/urfave/cli"
)
func main() {
_ = fmt.Println
_ = os.Exit
app := cli.NewApp()
app.Name = "helm plugin"
app.Usage = "helm plugin"
app.Action = run
app.Version = "0.0.1α"
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "echo, e",
Usage: "this text'll be ech'll",
EnvVar: "ECHO",
},
}
if err := app.Run(os.Args); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err.Error())
}
}
func run(c *cli.Context) error {
fmt.Println(c.String("echo"))
return nil
}