Skip to content

Commit 4751a8e

Browse files
committed
hotfix: ldflags '-s -w' only on release builds
1 parent 3856a25 commit 4751a8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ func build(projectName string, targetOS string, vmArguments []string) {
221221
if targetOS == "windows" {
222222
ldflags = append(ldflags, "-H=windowsgui")
223223
}
224+
ldflags = append(ldflags, "-s")
225+
ldflags = append(ldflags, "-w")
224226
}
225-
ldflags = append(ldflags, "-s")
226-
ldflags = append(ldflags, "-w")
227227
ldflags = append(ldflags, fmt.Sprintf("-X main.vmArguments=%s", strings.Join(vmArguments, ";")))
228228

229229
cmdGoBuild := exec.Command(goBin, "build",

0 commit comments

Comments
 (0)