-
Notifications
You must be signed in to change notification settings - Fork 394
/
svc.go
45 lines (37 loc) · 1.24 KB
/
svc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"github.com/aws/copilot-cli/cmd/copilot/template"
"github.com/aws/copilot-cli/internal/pkg/cli/group"
"github.com/spf13/cobra"
)
var errNoAppInWorkspace = errors.New("could not find an application attached to this workspace, please run `app init` first")
// BuildSvcCmd is the top level command for service.
func BuildSvcCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "svc",
Short: `Commands for services.
Services are long-running ECS or App Runner services.`,
Long: `Commands for services.
Services are long-running ECS or App Runner services.`,
}
cmd.AddCommand(buildSvcInitCmd())
cmd.AddCommand(buildSvcListCmd())
cmd.AddCommand(buildSvcPackageCmd())
cmd.AddCommand(buildSvcOverrideCmd())
cmd.AddCommand(buildSvcDeployCmd())
cmd.AddCommand(buildSvcDeleteCmd())
cmd.AddCommand(buildSvcShowCmd())
cmd.AddCommand(buildSvcStatusCmd())
cmd.AddCommand(buildSvcLogsCmd())
cmd.AddCommand(buildSvcExecCmd())
cmd.AddCommand(buildSvcPauseCmd())
cmd.AddCommand(buildSvcResumeCmd())
cmd.SetUsageTemplate(template.Usage)
cmd.Annotations = map[string]string{
"group": group.Develop,
}
return cmd
}