for some reason, needs ldflag each arg?

This commit is contained in:
Jeff Carr 2024-03-01 21:33:22 -06:00
parent 3ab4e466e1
commit dc4924306d
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ func (c *controlBox) buildPackage() error {
os.Setenv("GO111MODULE", "off")
vldflag := "-X main.VERSION=" + version
gldflag := "-X main.GUIVERSION=" + version // todo: git this from the filesystem
if shell.Run([]string{"go", "build", "-v", "-x", "-ldflags", vldflag, gldflag}) {
if shell.Run([]string{"go", "build", "-v", "-x", "-ldflags", vldflag, "-ldflags", gldflag}) {
log.Warn("go build worked")
} else {
return errors.New("go build")
@ -83,7 +83,7 @@ func (c *controlBox) buildPackage() error {
}
if shell.Exists("files") {
if !shell.Run([]string{"rm", "-rf", "files"}) {
if shell.Run([]string{"rm", "-rf", "files"}) {
log.Warn("rm failed")
return errors.New("rm files/")
}