-
Notifications
You must be signed in to change notification settings - Fork 0
/
command.go
30 lines (26 loc) · 912 Bytes
/
command.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
package command
import (
_init "github.com/solivaf/go-maria/internal/app/command/init"
"github.com/solivaf/go-maria/internal/app/command/release/major"
"github.com/solivaf/go-maria/internal/app/command/release/minor"
"github.com/solivaf/go-maria/internal/app/command/release/patch"
"gopkg.in/urfave/cli.v2"
)
func CreateRelease() *cli.Command {
return &cli.Command{
Name: "release", Aliases: []string{"r"},
Usage: "Releases a new version", UsageText: "release [options] [arguments...]",
Subcommands: createReleaseSubCommands(),
}
}
func createReleaseSubCommands() []*cli.Command {
return []*cli.Command{major.Command(), minor.Command(), patch.Command()}
}
func CreateInit() *cli.Command {
return &cli.Command{
Name: "init",
Usage: "Initialize project with go-maria configuration",
UsageText: "go-maria init <app-name>",
Aliases: []string{"i"},
Action: _init.Execute}
}