-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
46 lines (39 loc) · 788 Bytes
/
main.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
46
package main
import (
"os"
"github.com/codegangsta/cli"
)
func main() {
finished := make(chan bool)
go loading(finished)
app := cli.NewApp()
app.Name = "kangol"
app.Usage = "ECS deployment tool"
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "conf",
Value: "",
Usage: "ECS service family at task definition",
},
cli.StringFlag{
Name: "tag",
Value: "",
Usage: "--tag has a container tag",
},
cli.BoolFlag{
Name: "debug",
Usage: "--debug has a debug mode",
},
cli.BoolFlag{
Name: "loading",
Usage: "--loading has a loading while deploying",
},
}
app.Action = func(c *cli.Context) {
if c.Bool("loading") == false {
finished <- true
}
deploy(c.String("conf"), c.String("tag"), c.Bool("debug"))
}
app.Run(os.Args)
}