ldflags not working

This commit is contained in:
Jeff Carr 2024-03-07 22:07:40 -06:00
parent b5825e93dd
commit 89eb940a9e
3 changed files with 5 additions and 4 deletions

View File

@ -11,8 +11,8 @@ no-gui: build
./go-clone --no-gui ./go-clone --no-gui
build: build:
# GO111MODULE=off go build -v -ldflags "-X main.VERSION=${VERSION}" -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}" @# GO111MODULE=off go build -v -ldflags "-X main.GUIVERSION=${VERSION}"
install: install:
GO111MODULE="off" go install -v GO111MODULE="off" go install -v

View File

@ -11,7 +11,7 @@ type args struct {
Work bool `arg:"--work" help:"make a work directory"` Work bool `arg:"--work" help:"make a work directory"`
} }
func (args) Description() string { func (a args) Description() string {
return ` return `
Example usage: "go-clone go.wit.com/apps/go-clone" Example usage: "go-clone go.wit.com/apps/go-clone"

View File

@ -25,6 +25,7 @@ func main() {
// fmt.Println("hello world") // fmt.Println("hello world")
tmp := myargs.Description() tmp := myargs.Description()
fmt.Println(tmp) fmt.Println(tmp)
fmt.Println(myargs.Version())
os.Exit(0) os.Exit(0)
} }
@ -41,7 +42,7 @@ func main() {
b := gui.RawBox() b := gui.RawBox()
rv = repolist.AutotypistView(b) rv = repolist.AutotypistView(b)
// clone(myargs.Repo) os.Setenv("REPO_AUTO_CLONE", "true")
rv.NewRepo(myargs.Repo) rv.NewRepo(myargs.Repo)
// rv.NewRepo("go.wit.com/apps/helloworld") // rv.NewRepo("go.wit.com/apps/helloworld")