Skip to content
Permalink
Browse files

add --stage flag to `up build`

  • Loading branch information...
tj committed Apr 27, 2018
1 parent cb4a13a commit 1279ba174389ce7694e16747978c48d240f31bfd
Showing with 7 additions and 1 deletion.
  1. +7 −1 internal/cli/build/build.go
@@ -21,11 +21,13 @@ import (

func init() {
cmd := root.Command("build", "Build zip file.")
size := cmd.Flag("size", "Show zip contents size information.").Bool()
cmd.Example(`up build`, "Build archive and save to ./out.zip")
cmd.Example(`up build > /tmp/out.zip`, "Build archive and output to file via stdout.")
cmd.Example(`up build --size`, "Build archive and list files by size.")

stage := cmd.Flag("stage", "Target stage name.").Short('s').Default("staging").String()
size := cmd.Flag("size", "Show zip contents size information.").Bool()

cmd.Action(func(_ *kingpin.ParseContext) error {
defer util.Pad()()

@@ -36,6 +38,10 @@ func init() {

stats.Track("Build", nil)

if err := p.Init(*stage); err != nil {
return errors.Wrap(err, "initializing")
}

if err := p.Build(); err != nil {
return errors.Wrap(err, "building")
}

0 comments on commit 1279ba1

Please sign in to comment.
You can’t perform that action at this time.