summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-25 05:03:46 -0500
committerJeff Carr <[email protected]>2025-09-25 05:03:46 -0500
commitd07ba68cd119023b44f5968eb26ccf3926c047eb (patch)
treee7e3c6d12fd2d0c0b3898e91dfc224fc350547e6
parentdada18c9a153db03f9cf52b6d4ba7e864bf5e3ba (diff)
build smaller release binariesv0.22.144
-rw-r--r--build.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/build.go b/build.go
index 7b7c512..4dd53f8 100644
--- a/build.go
+++ b/build.go
@@ -104,7 +104,11 @@ func buildPackage(repo *gitpb.Repo) (bool, error) {
datestamp := now.UTC().Format("2006/01/02_1504_UTC")
log.Info("datestamp =", datestamp)
// add some standard golang flags
- ldflags := "-X main.VERSION=" + version + " "
+ var ldflags string
+ if argv.Release {
+ ldflags += "-s -w "
+ }
+ ldflags += "-X main.VERSION=" + version + " "
ldflags += "-X main.BUILDTIME=" + datestamp + " "
ldflags += "-X main.GUIVERSION=" + version + "" // todo: git this from the filesystem
cmd = append(cmd, "-ldflags", ldflags)