mage: show variables
This commit is contained in:
parent
eb5d770c45
commit
d41ed43455
12
mage.go
12
mage.go
|
@ -32,6 +32,10 @@ func buildBins(goos, goarch string) {
|
|||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
fmt.Print("generating code...")
|
||||
Generate(ctx)
|
||||
fmt.Print("\rCode generation successful \n")
|
||||
|
||||
d := filepath.Join(wd, "./bin")
|
||||
|
||||
os.MkdirAll(filepath.Join(d, goos, goarch), 0777)
|
||||
|
@ -181,3 +185,11 @@ func Generate(ctx context.Context) {
|
|||
|
||||
shouldWork(ctx, nil, dir, "sh", "./regen.sh")
|
||||
}
|
||||
|
||||
// Vars shows the various variables that this magefile uses.
|
||||
func Vars() {
|
||||
qod.Printlnf("goarch:\t%s", runtime.GOARCH)
|
||||
qod.Printlnf("goos:\t%s", runtime.GOOS)
|
||||
qod.Printlnf("arches:\t%v", arches)
|
||||
qod.Printlnf("wd:\t%s", wd)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue