@@ -54,22 +54,24 @@ func Run(cfg *config.Config) *cli.Command {
5454
5555// createCmd returns the "tag create" subcommand.
5656func (tc * TagCommand ) createCmd (cfg * config.Config ) * cli.Command {
57+ flags := []cli.Flag {
58+ & cli.BoolFlag {
59+ Name : "push" ,
60+ Usage : "Push the tag to remote after creation" ,
61+ },
62+ & cli.StringFlag {
63+ Name : "message" ,
64+ Usage : "Override the tag message (for annotated/signed tags)" ,
65+ },
66+ }
67+ flags = append (flags , cliflags .MultiModuleFlags ()... )
68+
5769 return & cli.Command {
5870 Name : "create" ,
5971 Aliases : []string {"c" , "new" },
6072 Usage : "Create a git tag for the current version" ,
61- UsageText : "sley tag create [--push] [--message <msg>]" ,
62- Flags : []cli.Flag {
63- & cli.BoolFlag {
64- Name : "push" ,
65- Usage : "Push the tag to remote after creation" ,
66- },
67- & cli.StringFlag {
68- Name : "message" ,
69- Aliases : []string {"m" },
70- Usage : "Override the tag message (for annotated/signed tags)" ,
71- },
72- },
73+ UsageText : "sley tag create [--push] [--message <msg>] [--all] [--module name]" ,
74+ Flags : flags ,
7375 Action : func (ctx context.Context , cmd * cli.Command ) error {
7476 return tc .runCreateCmd (ctx , cmd , cfg )
7577 },
@@ -78,19 +80,22 @@ func (tc *TagCommand) createCmd(cfg *config.Config) *cli.Command {
7880
7981// listCmd returns the "tag list" subcommand.
8082func (tc * TagCommand ) listCmd (cfg * config.Config ) * cli.Command {
83+ flags := []cli.Flag {
84+ & cli.IntFlag {
85+ Name : "limit" ,
86+ Aliases : []string {"n" },
87+ Usage : "Limit the number of tags shown" ,
88+ Value : 0 ,
89+ },
90+ }
91+ flags = append (flags , cliflags .MultiModuleFlags ()... )
92+
8193 return & cli.Command {
8294 Name : "list" ,
8395 Aliases : []string {"l" , "ls" },
8496 Usage : "List existing version tags" ,
85- UsageText : "sley tag list [--limit <n>]" ,
86- Flags : []cli.Flag {
87- & cli.IntFlag {
88- Name : "limit" ,
89- Aliases : []string {"n" },
90- Usage : "Limit the number of tags shown" ,
91- Value : 0 ,
92- },
93- },
97+ UsageText : "sley tag list [--limit <n>] [--all] [--module name]" ,
98+ Flags : flags ,
9499 Action : func (ctx context.Context , cmd * cli.Command ) error {
95100 return tc .runListCmd (ctx , cmd , cfg )
96101 },
@@ -103,7 +108,8 @@ func (tc *TagCommand) pushCmd(cfg *config.Config) *cli.Command {
103108 Name : "push" ,
104109 Aliases : []string {"p" },
105110 Usage : "Push a tag to remote" ,
106- UsageText : "sley tag push [tag-name]" ,
111+ UsageText : "sley tag push [tag-name] [--all] [--module name]" ,
112+ Flags : cliflags .MultiModuleFlags (),
107113 Action : func (ctx context.Context , cmd * cli.Command ) error {
108114 return tc .runPushCmd (ctx , cmd , cfg )
109115 },
0 commit comments