From e9af1f0e51372326a0fcdc292c9a043ef00c52a2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 5 Oct 2025 13:02:38 -0500 Subject: version timestamps always in seconds --- build.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build.go b/build.go index 6042b62..dc06166 100644 --- a/build.go +++ b/build.go @@ -103,6 +103,7 @@ func (f *Forge) doBuild(repo *gitpb.Repo, userFlags []string, goWhat string) err soname := fname + "." + version + ".so" linkname := fname + ".so" sopath := filepath.Join(homeDir, "go/lib/go-gui") + // if this is a plugin, use buildmode=plugin if repo.GetRepoType() == "plugin" { if goWhat == "install" { @@ -118,10 +119,7 @@ func (f *Forge) doBuild(repo *gitpb.Repo, userFlags []string, goWhat string) err // set standard ldflag options now := time.Now() - // datestamp := now.UTC().Format("2006/01/02_1504_UTC") - datestamp := now.UTC().Format("2006-01-02_15:04:05_UTC") // 2006-01-02 15:04:05 UTC - // log.Info("datestamp =", datestamp) - // add some standard golang flags + datestamp := log.Sprintf("%d", now.Unix()) // print seconds, parse in go-args --version ldflags := "-X main.VERSION=" + version + " " ldflags += "-X main.BUILDTIME=" + datestamp + " " ldflags += "-X main.GUIVERSION=" + version + "" // todo: git this from the filesystem -- cgit v1.2.3