Example #1
0
func uploadChart(c *cli.Context) error {
	args := c.Args()
	if len(args) < 1 {
		format.Err("First argument, filename, is required. Try 'helm deploy --help'")
		os.Exit(1)
	}

	cname := c.String("name")
	fname := args[0]

	if fname == "" {
		return errors.New("A filename must be specified. For a tar archive, this is the name of the root template in the archive.")
	}

	_, err := doUpload(fname, cname, c)
	return err
}
Example #2
0
File: helm.go Project: jackgr/helm
func run(c *cli.Context, f func(c *cli.Context) error) {
	if err := f(c); err != nil {
		format.Err(err)
		os.Exit(1)
	}
}