mage: add runmigrations to the autobuild list
This commit is contained in:
parent
cd17465155
commit
c0c610af43
20
mage.go
20
mage.go
|
@ -14,8 +14,11 @@ import (
|
||||||
"github.com/magefile/mage/mg"
|
"github.com/magefile/mage/mg"
|
||||||
)
|
)
|
||||||
|
|
||||||
var wd string
|
var (
|
||||||
var arches []string
|
wd string
|
||||||
|
arches []string
|
||||||
|
bins []string
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
lwd, err := os.Getwd()
|
lwd, err := os.Getwd()
|
||||||
|
@ -23,7 +26,15 @@ func init() {
|
||||||
|
|
||||||
wd = lwd
|
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/"
|
const pkgBase = "git.xeserv.us/xena/route/"
|
||||||
|
@ -36,7 +47,7 @@ func buildBins(goos, goarch string) {
|
||||||
|
|
||||||
os.MkdirAll(filepath.Join(d, goos, goarch), 0777)
|
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}
|
env := []string{"GOOS=" + goos, "GOARCH=" + goarch}
|
||||||
goBuild(ctx, env, filepath.Join(d, goos, goarch), "cmd/"+pkg)
|
goBuild(ctx, env, filepath.Join(d, goos, goarch), "cmd/"+pkg)
|
||||||
goInstall(ctx, env, "cmd/"+pkg)
|
goInstall(ctx, env, "cmd/"+pkg)
|
||||||
|
@ -181,6 +192,7 @@ func Vars() {
|
||||||
qod.ANE(err)
|
qod.ANE(err)
|
||||||
|
|
||||||
qod.Printlnf("arches:\t%v", arches)
|
qod.Printlnf("arches:\t%v", arches)
|
||||||
|
qod.Printlnf("bins:\t%v", bins)
|
||||||
qod.Printlnf("goarch:\t%s", runtime.GOARCH)
|
qod.Printlnf("goarch:\t%s", runtime.GOARCH)
|
||||||
qod.Printlnf("goos:\t%s", runtime.GOOS)
|
qod.Printlnf("goos:\t%s", runtime.GOOS)
|
||||||
qod.Printlnf("wd:\t%s", wd)
|
qod.Printlnf("wd:\t%s", wd)
|
||||||
|
|
Loading…
Reference in New Issue