1
0
mirror of https://github.com/beego/bee.git synced 2025-07-05 18:20:18 +00:00

Added support for gopm

This commit is contained in:
Unknown
2013-11-03 22:16:15 -05:00
parent 865272a7f7
commit a4baa777cb
6 changed files with 111 additions and 68 deletions

View File

@ -111,18 +111,23 @@ func Autobuild() {
path, _ := os.Getwd()
os.Chdir(path)
cmdName := "go"
if conf.Gopm.Enable {
cmdName = "gopm"
}
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 {
icmd := exec.Command("go", "install")
icmd := exec.Command(cmdName, "install")
icmd.Stdout = os.Stdout
icmd.Stderr = os.Stderr
err = icmd.Run()
}
if err == nil {
bcmd := exec.Command("go", "build")
bcmd := exec.Command(cmdName, "build")
bcmd.Stdout = os.Stdout
bcmd.Stderr = os.Stderr
err = bcmd.Run()