Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Rename the deploy command #410

Merged
merged 2 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/cli/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var deploymentCommand = &cli.Command{
Subcommands: []*cli.Command{
deploymentListCommand,
deploymentGetCommand,
deploymentDeployCommand,
deploymentCreateCommand,
deploymentUpdateCommand,
},
}
4 changes: 2 additions & 2 deletions cmd/cli/deployment_deploy.go → cmd/cli/deployment_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<owner>/<repo>",
Flags: []cli.Flag{
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 != "" {
Expand Down