From 89eb940a9e7b400f486366de92621508be662046 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 7 Mar 2024 22:07:40 -0600 Subject: [PATCH] ldflags not working --- Makefile | 4 ++-- argv.go | 2 +- main.go | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index bef96ae..2e9d4fa 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,8 @@ no-gui: build ./go-clone --no-gui build: - # GO111MODULE=off go build -v -ldflags "-X main.VERSION=${VERSION}" -ldflags "-X main.GUIVERSION=${VERSION}" - GO111MODULE=off go build -v -ldflags "-X main.GUIVERSION=${VERSION}" + GO111MODULE=off go build -v -ldflags "-X main.VERSION=${VERSION}" -ldflags "-X main.GUIVERSION=${VERSION}" + @# GO111MODULE=off go build -v -ldflags "-X main.GUIVERSION=${VERSION}" install: GO111MODULE="off" go install -v diff --git a/argv.go b/argv.go index be670dd..97940cb 100644 --- a/argv.go +++ b/argv.go @@ -11,7 +11,7 @@ type args struct { Work bool `arg:"--work" help:"make a work directory"` } -func (args) Description() string { +func (a args) Description() string { return ` Example usage: "go-clone go.wit.com/apps/go-clone" diff --git a/main.go b/main.go index 7b14246..661c115 100644 --- a/main.go +++ b/main.go @@ -25,6 +25,7 @@ func main() { // fmt.Println("hello world") tmp := myargs.Description() fmt.Println(tmp) + fmt.Println(myargs.Version()) os.Exit(0) } @@ -41,7 +42,7 @@ func main() { b := gui.RawBox() rv = repolist.AutotypistView(b) - // clone(myargs.Repo) + os.Setenv("REPO_AUTO_CLONE", "true") rv.NewRepo(myargs.Repo) // rv.NewRepo("go.wit.com/apps/helloworld")