From cb225809ed21e00684c4379a033faf0f2a82141e Mon Sep 17 00:00:00 2001 From: dehanj Date: Wed, 17 Apr 2024 15:19:28 +0200 Subject: [PATCH] Update tray's "About", use new URL to repo and include version. --- Makefile | 2 +- cmd/tkey-ssh-agent-tray/main.go | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d66ff53d..65779e5c 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ tkey-ssh-agent.exe: tkey-ssh-agent-tray.exe: $(MAKE) -C gotools go-winres cd ./cmd/tkey-ssh-agent-tray && ../../gotools/go-winres make --arch amd64 - GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-H windowsgui" -trimpath -buildvcs=false ./cmd/tkey-ssh-agent-tray + GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-H windowsgui -X main.version=$(TKEY_SSH_AGENT_VERSION)" -trimpath -buildvcs=false ./cmd/tkey-ssh-agent-tray .PHONY: clean clean: diff --git a/cmd/tkey-ssh-agent-tray/main.go b/cmd/tkey-ssh-agent-tray/main.go index 4b739ae4..ef1b5955 100644 --- a/cmd/tkey-ssh-agent-tray/main.go +++ b/cmd/tkey-ssh-agent-tray/main.go @@ -30,6 +30,8 @@ const ( mainExe = "tkey-ssh-agent.exe" ) +var version string + var notify = func(msg string) { tkeyutil.Notify(progname, msg) } @@ -40,6 +42,10 @@ func main() { os.Exit(1) } + if version == "" { + version = "unknown" // The version should be set from make during build. + } + // We're not supposed to be run in a console , but if we still are // then try to get our output into it if err := fixconsole.FixConsoleIfNeeded(); err != nil { @@ -122,10 +128,11 @@ Source code is licensed under GNU General Public License v2.0 only unless otherwise noted in the source code. -Source repository: https://github.com/tillitis/tillitis-key1-apps +Source repository: https://github.com/tillitis/tkey-ssh-agent Tillitis: https://www.tillitis.se -Running: %s`, mainCmdLine)) +Version: %s +Running: %s`, version, mainCmdLine)) } }()