Skip to content

Commit

Permalink
Merge pull request #9 from yeka/master
Browse files Browse the repository at this point in the history
Add option to build specific package
  • Loading branch information
jondot authored Apr 5, 2019
2 parents 130178c + 562aafa commit 1668a5d
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 1668a5d

Please sign in to comment.