git: 7364bc76868d - main - textproc/ov: Display version/revision in (-v) flag

Lewis Cook lcook at FreeBSD.org
Thu May 27 15:25:27 UTC 2021


The branch main has been updated by lcook:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7364bc76868d0a3592b5a3bc0d9d81c714f0ff05

commit 7364bc76868d0a3592b5a3bc0d9d81c714f0ff05
Author:     Lewis Cook <lcook at FreeBSD.org>
AuthorDate: 2021-05-27 15:22:36 +0000
Commit:     Lewis Cook <lcook at FreeBSD.org>
CommitDate: 2021-05-27 15:24:50 +0000

    textproc/ov: Display version/revision in (-v) flag
---
 textproc/ov/Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/textproc/ov/Makefile b/textproc/ov/Makefile
index 5e40d2f99d46..6421e61a3806 100644
--- a/textproc/ov/Makefile
+++ b/textproc/ov/Makefile
@@ -11,7 +11,14 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 USES=		go:modules
 
+_BUILD_VERSION=		${DISTVERSIONFULL}
+_BUILD_REVISION=	5ea83bc
+
 GO_MODULE=	github.com/noborus/${PORTNAME}
+GO_BUILDFLAGS=	-ldflags "\
+		-s -w \
+		-X main.Version=${_BUILD_VERSION} \
+		-X main.Revision=${_BUILD_REVISION}"
 
 PLIST_FILES=	bin/${PORTNAME}
 PORTDOCS=	README.md


More information about the dev-commits-ports-all mailing list