git: 471f9291a828 - main - net/syncthing: Add test target

From: Dan Langille <dvl_at_FreeBSD.org>
Date: Tue, 11 Apr 2023 21:42:55 UTC
The branch main has been updated by dvl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=471f9291a828f3b5824d942c8f85fea57fb53506

commit 471f9291a828f3b5824d942c8f85fea57fb53506
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2023-04-11 21:40:25 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2023-04-11 21:40:25 +0000

    net/syncthing: Add test target
    
    This also moves from PORTVERSION to DISTVERSION
    
    PR:             270722
---
 net/syncthing/Makefile | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/net/syncthing/Makefile b/net/syncthing/Makefile
index 8493a4250afd..0e584f51c181 100644
--- a/net/syncthing/Makefile
+++ b/net/syncthing/Makefile
@@ -1,10 +1,10 @@
 PORTNAME=	syncthing
-PORTVERSION=	1.23.4
+DISTVERSION=	1.23.4
+PORTREVISION=	1
 DISTVERSIONPREFIX=	v
 CATEGORIES=	net
-MASTER_SITES=	https://github.com/syncthing/syncthing/releases/download/v${PORTVERSION}/
-DISTNAME=	${PORTNAME}-source-${DISTVERSIONPREFIX}${PORTVERSION}
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
+MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/releases/download/v${DISTVERSION}/
+DISTNAME=	${PORTNAME}-source-${DISTVERSIONFULL}
 
 MAINTAINER=	dvl@FreeBSD.org
 COMMENT=	Encrypted file sync tool
@@ -37,10 +37,15 @@ NO_WRKSUBDIR=	yes
 
 do-build:
 	@( cd ${WRKSRC}/${PORTNAME} ; \
-		${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run build.go -version v${PORTVERSION} -no-upgrade build ; \
-		${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run build.go -version v${PORTVERSION} -no-upgrade build stdiscosrv; \
-		${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run build.go -version v${PORTVERSION} -no-upgrade build strelaysrv; \
-		${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run build.go -version v${PORTVERSION} -no-upgrade build strelaypoolsrv; \
+		${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run build.go -version v${DISTVERSION} -no-upgrade build ; \
+		${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run build.go -version v${DISTVERSION} -no-upgrade build stdiscosrv; \
+		${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run build.go -version v${DISTVERSION} -no-upgrade build strelaysrv; \
+		${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run build.go -version v${DISTVERSION} -no-upgrade build strelaypoolsrv; \
+		)
+
+do-test:
+	@( cd ${WRKSRC}/${PORTNAME} ; \
+		${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run build.go -version v${DISTVERSION} -no-upgrade test ; \
 		)
 
 do-install: