-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.go
36 lines (29 loc) · 920 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 (
"os"
"gopkg.in/alecthomas/kingpin.v2"
)
// Although these are configuration values, they're not exposed to the public and are therefore kept internally.
var (
catalogURIs = map[string]string{
"local": "http://localhost:5000",
"dev": "https://appcatalog.development.travix.com",
"staging": "https://appcatalog.staging.travix.com",
"prod": "https://appcatalog.travix.com",
}
targetEnv = "dev"
verbose = false
)
func main() {
app := kingpin.New("appix", "App Developer Kit for the Travix Fireball infrastructure.")
app.Flag("cat", "Specify the catalog to use (local, dev, staging, prod)").
Default("dev").
EnumVar(&targetEnv, "local", "dev", "staging", "prod")
app.Flag("verbose", "Verbose mode.").
Short('v').
BoolVar(&verbose)
configureInitCommand(app)
configurePushCommand(app)
configurePublishCommand(app)
kingpin.MustParse(app.Parse(os.Args[1:]))
}