mirror of
https://github.com/beego/bee.git
synced 2025-07-12 14:51:01 +00:00
Enable go install by default to reduce build time without gopm.
This commit is contained in:
9
watch.go
9
watch.go
@ -132,7 +132,14 @@ func AutoBuild(files []string, isgenerate bool) {
|
||||
var err error
|
||||
// For applications use full import path like "github.com/.../.."
|
||||
// are able to use "go install" to reduce build time.
|
||||
if conf.GoInstall || conf.Gopm.Install {
|
||||
if conf.GoInstall {
|
||||
icmd := exec.Command(cmdName, "install", "-v")
|
||||
icmd.Stdout = os.Stdout
|
||||
icmd.Stderr = os.Stderr
|
||||
icmd.Env = append(os.Environ(), "GOGC=off")
|
||||
icmd.Run()
|
||||
}
|
||||
if conf.Gopm.Install {
|
||||
icmd := exec.Command("go", "list", "./...")
|
||||
buf := bytes.NewBuffer([]byte(""))
|
||||
icmd.Stdout = buf
|
||||
|
Reference in New Issue
Block a user