Hello! >`termshot --version`: > termshot version (development) It seams that -X ${GO_MODULE}/internal.Version=${DISTVERSION}" isn't working. internal/cmd/root.go: --- if showVersion, err := cmd.Flags().GetBool("version"); showVersion && err == nil { if len(version) == 0 { version = "(development)" } --- Sometimes I have similar problems geting "version" to work properly. I have tried several combinations without success. Any clues? Thanks, Nuno
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3f210ce0ecfca8d2a52e778404338f5bcee2bdd8 commit 3f210ce0ecfca8d2a52e778404338f5bcee2bdd8 Author: Loïc Bartoletti <lbartoletti@FreeBSD.org> AuthorDate: 2022-10-27 09:33:46 +0000 Commit: Loïc Bartoletti <lbartoletti@FreeBSD.org> CommitDate: 2022-10-27 09:34:38 +0000 textproc/termshot: Update to 0.2.5 fix --version PR: 266567 Reported by: eduardo textproc/termshot/Makefile | 5 ++--- textproc/termshot/distinfo | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-)
Updated and fixed. The variable was in internal/cmd.version and not internal.Version ...
(In reply to Loïc Bartoletti from comment #2) Nice, I think I understand how it works! Thanks