forked from rafecolton/docker-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.go
More file actions
37 lines (29 loc) · 751 Bytes
/
build.go
File metadata and controls
37 lines (29 loc) · 751 Bytes
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
package main
import (
"github.com/modcloth/docker-builder/builder"
"github.com/modcloth/docker-builder/parser"
"github.com/codegangsta/cli"
)
func build(c *cli.Context) {
builder.SkipPush = c.Bool("skip-push")
builderfile := c.Args().First()
if builderfile == "" {
builderfile = "Bobfile"
}
par, err := parser.NewParser(builderfile, Logger)
if err != nil {
exitErr(73, "unable to generate parser", err)
}
commandSequence, err := par.Parse()
if err != nil {
exitErr(23, "unable to parse", err)
}
bob, err := builder.NewBuilder(Logger, true)
if err != nil {
exitErr(61, "unable to build", err)
}
bob.Builderfile = builderfile
if err = bob.Build(commandSequence); err != nil {
exitErr(29, "unable to build", err)
}
}