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

support ldflags

This commit is contained in:
qiantao
2020-06-02 18:19:48 +08:00
parent c085194507
commit ee489ba3bb
2 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,7 @@ import (
"time"
"github.com/beego/bee/config"
beeLogger "github.com/beego/bee/logger"
"github.com/beego/bee/logger"
"github.com/beego/bee/logger/colors"
"github.com/beego/bee/utils"
"github.com/fsnotify/fsnotify"
@ -158,6 +158,9 @@ func AutoBuild(files []string, isgenerate bool) {
if buildTags != "" {
args = append(args, "-tags", buildTags)
}
if buildLDFlags != "" {
args = append(args, "-ldflags", buildLDFlags)
}
args = append(args, files...)
bcmd := exec.Command(cmdName, args...)