mage: always build the plugin on linux

This commit is contained in:
Cadey Ratio 2017-09-30 10:11:04 -07:00
parent ea931db0b2
commit 2074d01b9e
No known key found for this signature in database
GPG Key ID: D607EE27C2E7F89A
1 changed files with 6 additions and 1 deletions

View File

@ -54,7 +54,7 @@ func goBuildPlugin(ctx context.Context, dir, pkgname, fname string) {
return
}
shouldWork(ctx, nil, dir, "go", "build", "-buildmode=plugin", "-o=fname", pkgBase+pkgname)
shouldWork(ctx, nil, dir, "go", "build", "-buildmode=plugin", "-o="+fname, pkgBase+pkgname)
}
func buildBins(goos string) {
@ -79,6 +79,7 @@ func buildBins(goos string) {
// Linux builds binaries for linux
func Linux() {
buildBins("linux")
Plugin()
}
// Windows builds binaries for windows
@ -94,6 +95,10 @@ func Darwin() {
// Build builds the binaries for route and routed.
func Build() {
buildBins(runtime.GOOS)
if runtime.GOOS == "linux" {
Plugin()
}
}
// Plugin builds all of the plugins for programs wanting to augment themselves with route.