-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.go
38 lines (31 loc) · 854 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
// Package main is for initializing CLI application
package main
import (
"os"
"fmt"
"github.com/smartrecruiters/docker-bakery/bakery"
cliCommons "github.com/smartrecruiters/docker-bakery/bakery/commons/cli"
"github.com/urfave/cli"
)
const (
applicationName = "docker-bakery"
applicationDescription = "CLI application for easier management of docker files"
)
var (
version string
commit string
date string
)
func versionString() string {
return fmt.Sprintf("%s, commit %s, built at %s", version, commit, date)
}
// Main file for the docker-bakery, assembles the app and its CLI commands
func main() {
app := cli.NewApp()
app.Name = applicationName
app.Usage = applicationDescription
app.Version = versionString()
app.Commands = bakery.GetCommands()
app.ExitErrHandler = cliCommons.CustomExitHandler
app.Run(os.Args)
}