mage: add runmigrations to the autobuild list

This commit is contained in:
Cadey Ratio 2018-01-21 12:50:52 -08:00
parent cd17465155
commit c0c610af43
1 changed files with 16 additions and 4 deletions

20
mage.go
View File

@ -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)