mirror of
https://github.com/beego/bee.git
synced 2024-11-22 10:10:53 +00:00
Merge pull request #336 from sergeylanzman/go-install-default
Go install default
This commit is contained in:
commit
b4a92f7521
2
conf.go
2
conf.go
@ -33,7 +33,7 @@ var defaultConf = `{
|
|||||||
"enable": false,
|
"enable": false,
|
||||||
"install": false
|
"install": false
|
||||||
},
|
},
|
||||||
"go_install": false,
|
"go_install": true,
|
||||||
"watch_ext": [],
|
"watch_ext": [],
|
||||||
"dir_structure": {
|
"dir_structure": {
|
||||||
"watch_all": false,
|
"watch_all": false,
|
||||||
|
9
watch.go
9
watch.go
@ -132,7 +132,14 @@ func AutoBuild(files []string, isgenerate bool) {
|
|||||||
var err error
|
var err error
|
||||||
// For applications use full import path like "github.com/.../.."
|
// For applications use full import path like "github.com/.../.."
|
||||||
// are able to use "go install" to reduce build time.
|
// 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", "./...")
|
icmd := exec.Command("go", "list", "./...")
|
||||||
buf := bytes.NewBuffer([]byte(""))
|
buf := bytes.NewBuffer([]byte(""))
|
||||||
icmd.Stdout = buf
|
icmd.Stdout = buf
|
||||||
|
Loading…
Reference in New Issue
Block a user