-
Notifications
You must be signed in to change notification settings - Fork 39
/
main.go
36 lines (27 loc) · 866 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
package main
import (
"fmt"
"os"
"github.com/EngineerBetter/control-tower/commands"
"github.com/fatih/color"
"gopkg.in/urfave/cli.v1"
)
// ControlTowerVersion is a compile-time variable set with -ldflags
var ControlTowerVersion = "COMPILE_TIME_VARIABLE_main_ControlTowerVersion"
var blue = color.New(color.FgCyan, color.Bold).SprintfFunc()
func main() {
app := cli.NewApp()
app.Name = "Control-Tower"
app.Usage = "A CLI tool to deploy Concourse CI"
app.Version = ControlTowerVersion
app.Commands = commands.Commands
app.Flags = commands.GlobalFlags
cli.AppHelpTemplate = fmt.Sprintf(`%s
See 'control-tower help <command>' to read about a specific command.
Built by %s %s
`, cli.AppHelpTemplate, blue("EngineerBetter"), blue("http://engineerbetter.com"))
if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}