File tree Expand file tree Collapse file tree 4 files changed +72
-1
lines changed
Expand file tree Collapse file tree 4 files changed +72
-1
lines changed Original file line number Diff line number Diff line change 11package cli
22
33import (
4+ "github.com/jfrog/jfrog-cli-application/application/commands/system"
5+ "github.com/jfrog/jfrog-cli-application/application/commands/version"
46 "github.com/jfrog/jfrog-cli-core/v2/plugins/components"
57)
68
@@ -14,7 +16,10 @@ func GetJfrogApplicationCli() components.App {
1416 Name : "app" ,
1517 Description : "Tools for Application Lifecycle management" ,
1618 Category : category ,
17- Commands : []components.Command {},
19+ Commands : []components.Command {
20+ system .GetPingCommand (),
21+ version .GetCreateVersionCommand (),
22+ },
1823 },
1924 )
2025 return app
Original file line number Diff line number Diff line change 1+ package system
2+
3+ import (
4+ "github.com/jfrog/jfrog-cli-application/application/common"
5+ "github.com/jfrog/jfrog-cli-core/v2/plugins/components"
6+ )
7+
8+ type pingCommand struct {
9+ ctx * components.Context
10+ }
11+
12+ func (pc * pingCommand ) executeCmd (ctx * components.Context ) error {
13+ return ctx .PrintCommandHelp (ctx .CommandName )
14+ }
15+
16+ func GetPingCommand () components.Command {
17+ return components.Command {
18+ Name : "ping" ,
19+ Description : "Ping the application server" ,
20+ Category : common .CategorySystem ,
21+ Aliases : []string {"p" },
22+ Arguments : []components.Argument {},
23+ Flags : []components.Flag {},
24+ EnvVars : []components.EnvVar {},
25+ Action : func (c * components.Context ) error {
26+ cmd := & pingCommand {ctx : c }
27+ return cmd .executeCmd (c )
28+ },
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ package version
2+
3+ import (
4+ "github.com/jfrog/jfrog-cli-application/application/common"
5+ "github.com/jfrog/jfrog-cli-core/v2/plugins/components"
6+ )
7+
8+ type createVersionCommand struct {
9+ ctx * components.Context
10+ }
11+
12+ func (cv * createVersionCommand ) executeCmd (ctx * components.Context ) error {
13+ return ctx .PrintCommandHelp (ctx .CommandName )
14+ }
15+
16+ func GetCreateVersionCommand () components.Command {
17+ return components.Command {
18+ Name : "create-version" ,
19+ Description : "Create application version" ,
20+ Category : common .CategoryVersion ,
21+ Aliases : []string {"cv" },
22+ Arguments : []components.Argument {},
23+ Flags : []components.Flag {},
24+ EnvVars : []components.EnvVar {},
25+ Action : func (c * components.Context ) error {
26+ cmd := & createVersionCommand {ctx : c }
27+ return cmd .executeCmd (c )
28+ },
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ package common
2+
3+ const (
4+ CategorySystem = "system"
5+ CategoryVersion = "version"
6+ )
You can’t perform that action at this time.
0 commit comments