Skip to content

Commit

Permalink
Update tray's "About", use new URL to repo and include version.
Browse files Browse the repository at this point in the history
  • Loading branch information
dehanj committed Apr 17, 2024
1 parent d0d77d9 commit 0de5fc5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,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:
Expand Down
11 changes: 9 additions & 2 deletions cmd/tkey-ssh-agent-tray/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const (
mainExe = "tkey-ssh-agent.exe"
)

var version string

var notify = func(msg string) {
tkeyutil.Notify(progname, msg)
}
Expand All @@ -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 {
Expand Down Expand Up @@ -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))
}
}()

Expand Down

0 comments on commit 0de5fc5

Please sign in to comment.