Move coco env deploy to the top-level, coco deploy

Deployments are central to the entire system; although technically
a deployment is indeed associated with an environment, the deployment
is the focus, not the environment, so it makes sense to put the
deployment command at the top-level.

Before, you'd say:

    $ coco env deploy production

And now, you will say:

    $ coco deploy production
This commit is contained in:
joeduffy 2017-03-10 13:17:55 -08:00
parent 9bf279ceae
commit 361eb62e7b
3 changed files with 7 additions and 7 deletions

View file

@ -41,6 +41,7 @@ func NewCoconutCmd() *cobra.Command {
cmd.PersistentFlags().IntVarP(
&verbose, "verbose", "v", 0, "Enable verbose logging (e.g., v=3); anything >3 is very verbose")
cmd.AddCommand(newDeployCmd())
cmd.AddCommand(newEnvCmd())
cmd.AddCommand(newPackCmd())
cmd.AddCommand(newVersionCmd())

View file

@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
)
func newEnvDeployCmd() *cobra.Command {
func newDeployCmd() *cobra.Command {
var dryRun bool
var showConfig bool
var showReplaceSteps bool

View file

@ -36,16 +36,15 @@ import (
func newEnvCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "env",
Short: "Manage or deploy into a target environment",
Long: "Manage or deploy into a target environment\n" +
Short: "Manage target environments",
Long: "Manage target environments\n" +
"\n" +
"An environment is a named deployment target, and a single nut have many of them. Each\n" +
"environment has a configuration and deployment history associated with it, stored in the\n" +
"workspace, in addition to a full checkpoint of the last known good deployment.\n",
"An environment is a named deployment target, and a single project may have many of them.\n" +
"Each environment has a configuration and deployment history associated with it, stored in\n" +
"the workspace, in addition to a full checkpoint of the last known good deployment.\n",
}
cmd.AddCommand(newEnvConfigCmd())
cmd.AddCommand(newEnvDeployCmd())
cmd.AddCommand(newEnvDestroyCmd())
cmd.AddCommand(newEnvInitCmd())
cmd.AddCommand(newEnvLsCmd())