示例#1
0
文件: info.go 项目: tbruyelle/gb
func info(ctx *gb.Context, args []string) error {
	fmt.Printf("GB_PROJECT_DIR=%q\n", ctx.Projectdir())
	fmt.Printf("GB_SRC_PATH=%q\n", joinlist(ctx.Srcdirs()...))
	fmt.Printf("GB_PKG_DIR=%q\n", ctx.Pkgdir())
	fmt.Printf("GB_BIN_SUFFIX=%q\n", ctx.Suffix())
	return nil
}
示例#2
0
文件: info.go 项目: torfuzx/gb
func makeenv(ctx *gb.Context) []envvar {
	return []envvar{
		{"GB_PROJECT_DIR", ctx.Projectdir()},
		{"GB_SRC_PATH", joinlist(ctx.Srcdirs()...)},
		{"GB_PKG_DIR", ctx.Pkgdir()},
		{"GB_BIN_SUFFIX", ctx.Suffix()},
		{"GB_GOROOT", runtime.GOROOT()},
	}
}