Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 May 2021 15:25:27 GMT
From:      Lewis Cook <lcook@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 7364bc76868d - main - textproc/ov: Display version/revision in (-v) flag
Message-ID:  <202105271525.14RFPRTE059635@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by lcook:

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

commit 7364bc76868d0a3592b5a3bc0d9d81c714f0ff05
Author:     Lewis Cook <lcook@FreeBSD.org>
AuthorDate: 2021-05-27 15:22:36 +0000
Commit:     Lewis Cook <lcook@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105271525.14RFPRTE059635>