diff --git a/cmd/cli/deployment.go b/cmd/cli/deployment.go index 2ae57617..6d8d311c 100644 --- a/cmd/cli/deployment.go +++ b/cmd/cli/deployment.go @@ -9,7 +9,7 @@ var deploymentCommand = &cli.Command{ Subcommands: []*cli.Command{ deploymentListCommand, deploymentGetCommand, - deploymentDeployCommand, + deploymentCreateCommand, deploymentUpdateCommand, }, } diff --git a/cmd/cli/deployment_deploy.go b/cmd/cli/deployment_create.go similarity index 93% rename from cmd/cli/deployment_deploy.go rename to cmd/cli/deployment_create.go index ec60383d..d21c4a74 100644 --- a/cmd/cli/deployment_deploy.go +++ b/cmd/cli/deployment_create.go @@ -6,8 +6,8 @@ import ( "github.com/gitploy-io/gitploy/pkg/api" ) -var deploymentDeployCommand = &cli.Command{ - Name: "deploy", +var deploymentCreateCommand = &cli.Command{ + Name: "create", Usage: "Deploy a specific ref(branch, SHA, tag) to the environment.", ArgsUsage: "/", Flags: []cli.Flag{ diff --git a/cmd/cli/shared.go b/cmd/cli/shared.go index c60e37c3..b8d3950c 100644 --- a/cmd/cli/shared.go +++ b/cmd/cli/shared.go @@ -26,7 +26,7 @@ func buildClient(cli *cli.Context) *api.Client { func splitFullName(name string) (string, string, error) { ss := strings.Split(name, "/") if len(ss) != 2 { - return "", "", fmt.Errorf("'%s' is invalid format", name) + return "", "", fmt.Errorf("'%s' is invalid repository name", name) } return ss[0], ss[1], nil @@ -36,7 +36,7 @@ func splitFullName(name string) (string, string, error) { func printJson(cli *cli.Context, v interface{}) error { output, err := json.MarshalIndent(v, "", " ") if err != nil { - return fmt.Errorf("Failed to marshal: %w", err) + return fmt.Errorf("Failed to print JSON format: %w", err) } if query := cli.String("query"); query != "" {