From c0c610af430fef3d674154ed25252da95d8633c3 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 21 Jan 2018 12:50:52 -0800 Subject: [PATCH] mage: add runmigrations to the autobuild list --- mage.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/mage.go b/mage.go index 416b4e0..a0669b1 100644 --- a/mage.go +++ b/mage.go @@ -14,8 +14,11 @@ import ( "github.com/magefile/mage/mg" ) -var wd string -var arches []string +var ( + wd string + arches []string + bins []string +) func init() { lwd, err := os.Getwd() @@ -23,7 +26,15 @@ func init() { wd = lwd - arches = []string{"amd64", "ppc64", "386", "arm", "arm64"} + arches = []string{"amd64", "ppc64le", "arm64"} + bins = []string{ + "mage", + "route-httpagent", + "route-cli", + "routed", + "route-runmigrations", + "terraform-provider-route", + } } const pkgBase = "git.xeserv.us/xena/route/" @@ -36,7 +47,7 @@ func buildBins(goos, goarch string) { os.MkdirAll(filepath.Join(d, goos, goarch), 0777) - for _, pkg := range []string{"route-httpagent", "route-cli", "routed", "terraform-provider-route"} { + for _, pkg := range bins { env := []string{"GOOS=" + goos, "GOARCH=" + goarch} goBuild(ctx, env, filepath.Join(d, goos, goarch), "cmd/"+pkg) goInstall(ctx, env, "cmd/"+pkg) @@ -181,6 +192,7 @@ func Vars() { qod.ANE(err) qod.Printlnf("arches:\t%v", arches) + qod.Printlnf("bins:\t%v", bins) qod.Printlnf("goarch:\t%s", runtime.GOARCH) qod.Printlnf("goos:\t%s", runtime.GOOS) qod.Printlnf("wd:\t%s", wd)