Skip to content

Commit

Permalink
Add option to build specific package
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakub Kristianto committed Apr 4, 2019
1 parent 36e5294 commit 562aafa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var (
var (
jsonOutput = kingpin.Flag("json", "Output json").Short('j').Bool()
buildTags = kingpin.Flag("tags", "Build tags").String()
packages = kingpin.Arg("packages", "Packages to build").String()
)

func main() {
Expand All @@ -27,6 +28,9 @@ func main() {
if *buildTags != "" {
weight.BuildCmd = append(weight.BuildCmd, "-tags", *buildTags)
}
if *packages != "" {
weight.BuildCmd = append(weight.BuildCmd, *packages)
}

work := weight.BuildCurrent()
modules := weight.Process(work)
Expand Down

0 comments on commit 562aafa

Please sign in to comment.