@@ -12,12 +12,14 @@ import (
1212 "context"
1313)
1414
15+ var VERSION = "unknown"
16+
1517func main () {
1618 plugin .Run (func (dockerCli command.Cli ) * cobra.Command {
1719 tag := & cobra.Command {
18- Use : "tag" ,
19- Args : cobra .MinimumNArgs (2 ),
20- Short : "Tag a source image with multiple extra tags." ,
20+ Use : "tag" ,
21+ Args : cobra .MinimumNArgs (2 ),
22+ Short : "Tag a source image with multiple extra tags." ,
2123 Example : "docker multi tag origin:tag target:tag target2:tag2 target3:tag" ,
2224 Run : func (cmd * cobra.Command , args []string ) {
2325 origin := args [0 ]
@@ -35,9 +37,9 @@ func main() {
3537 }
3638
3739 push := & cobra.Command {
38- Use : "push" ,
39- Args : cobra .MinimumNArgs (2 ),
40- Short : "Push multiple images in one command." ,
40+ Use : "push" ,
41+ Args : cobra .MinimumNArgs (2 ),
42+ Short : "Push multiple images in one command." ,
4143 Example : "docker multi push image:tag image:tag2 image:tag3" ,
4244 Run : func (cmd * cobra.Command , args []string ) {
4345 for i := 1 ; i < len (args ); i ++ {
@@ -53,7 +55,7 @@ func main() {
5355 }
5456
5557 cmd := & cobra.Command {
56- Use : "multi" ,
58+ Use : "multi" ,
5759 Short : "Batch-run commands." ,
5860 RunE : func (cmd * cobra.Command , args []string ) error {
5961 return nil
@@ -62,10 +64,10 @@ func main() {
6264
6365 cmd .AddCommand (tag , push )
6466 return cmd
65- }, manager.Metadata {
67+ }, manager.Metadata {
6668 ShortDescription : "Docker CLI Plugin to allow for batch commands." ,
67- SchemaVersion : "0.1.0" ,
68- Vendor : "Jitesoft" ,
69- Version : "0.0.1" ,
69+ SchemaVersion : "0.1.0" ,
70+ Vendor : "Jitesoft" ,
71+ Version : VERSION ,
7072 })
71- }
73+ }
0 commit comments