Skip to content

Commit

Permalink
Simplified UI: up/down instead of create/apply/uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
dkapanidis committed May 27, 2016
1 parent 331a00a commit 76a2b6c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 59 deletions.
6 changes: 3 additions & 3 deletions cmd/tide/uninstall.go → cmd/tide/down.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ chart in the current working directory.
`

var uninstallCmd = &cobra.Command{
Use: "uninstall [CHART]",
Short: "uninstall a chart archive.",
Use: "down [CHART]",
Short: "Delete a chart archive from Kubernetes.",
Long: uninstallDesc,
RunE: runUninstall,
}

func runUninstall(cmd *cobra.Command, args []string) error {
log.SetOutput(ioutil.Discard)
setupInstallEnv(args)
setupUninstallEnv(args)
manifest, _ := readManifest(installArg)
execute("delete", manifest)
return nil
Expand Down
51 changes: 0 additions & 51 deletions cmd/tide/install.go

This file was deleted.

6 changes: 3 additions & 3 deletions cmd/tide/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ chart in the current working directory.
`

var renderCmd = &cobra.Command{
Use: "render [CHART]",
Short: "render a chart archive.",
Use: "view [CHART]",
Short: "view a chart archive.",
Long: renderDesc,
RunE: runRender,
}

func runRender(cmd *cobra.Command, args []string) error {
log.SetOutput(ioutil.Discard)
setupInstallEnv(args)
setupRenderEnv(args)
manifest, _ := readManifest(installArg)
fmt.Printf("%s\n", manifest)
return nil
Expand Down
7 changes: 7 additions & 0 deletions cmd/tide/tide.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package main

import (
"fmt"
"github.com/spf13/cobra"
"os"
)

// install flags & args
Expand Down Expand Up @@ -29,6 +31,11 @@ var RootCommand = &cobra.Command{
Long: globalUsage,
}

func fatalf(format string, args ...interface{}) {
fmt.Printf("fatal: %s\n", fmt.Sprintf(format, args...))
os.Exit(0)
}

func init() {
RootCommand.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "enable verbose output")
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/tide/apply.go → cmd/tide/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ chart in the current working directory.
`

var applyCmd = &cobra.Command{
Use: "apply [CHART]",
Short: "apply a chart archive.",
Use: "up [CHART]",
Short: "Apply a chart archive to Kubernetes.",
Long: applyDesc,
RunE: runApply,
}
Expand Down

0 comments on commit 76a2b6c

Please sign in to comment.