git: f0bd7ca9d4bb - main - www/shiori: Update to 1.6.0.r.4

From: Nicola Vitale <nivit_at_FreeBSD.org>
Date: Thu, 09 Nov 2023 08:47:05 UTC
The branch main has been updated by nivit:

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

commit f0bd7ca9d4bba3c7490d98e8663a85a360b3ea91
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2023-11-09 08:44:25 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2023-11-09 08:44:25 +0000

    www/shiori: Update to 1.6.0.r.4
    
    - Use go 1.21 now
    - Fix `shiori version` output:
    
      normal output:
            Shiori version dev (build none) at unknown
    
      patched output:
            Shiori version 1.6.0-rc.4 (build FreeBSD) at 2023-11-09T08:25:04
    
    Release notes:  https://github.com/go-shiori/shiori/releases/tag/v1.6.0-rc.4
    Reported by:    github-actions[bot] <notifications@github.com>
---
 www/shiori/Makefile | 15 +++++++++++++--
 www/shiori/distinfo | 10 +++++-----
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/www/shiori/Makefile b/www/shiori/Makefile
index 081569aabd5a..33a687f338c9 100644
--- a/www/shiori/Makefile
+++ b/www/shiori/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	shiori
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.6.0-rc.1
+DISTVERSION=	1.6.0-rc.4
 CATEGORIES=	www
 
 MAINTAINER=	nivit@FreeBSD.org
@@ -10,10 +10,21 @@ WWW=		https://github.com/go-shiori/shiori
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		go:modules
+USES=		go:1.21,modules
 
 GO_MODULE=	github.com/go-shiori/shiori
 
 PLIST_FILES=	bin/${PORTNAME}
 
+BUILD_DATE=	%FT%T
+
+# fix `shiori version` output
+post-patch:
+	${REINPLACE_CMD} \
+		-e 's/"dev"/"${DISTVERSION}"/1' \
+		-e 's/"none"/"${OPSYS}"/1' \
+		-e 's/"unknown"/"${BUILD_DATE:gmtime}"/1' \
+		${WRKSRC}/main.go \
+		${WRKSRC}/internal/model/main.go
+
 .include <bsd.port.mk>
diff --git a/www/shiori/distinfo b/www/shiori/distinfo
index 836cc92f96b7..4c874a9ac74d 100644
--- a/www/shiori/distinfo
+++ b/www/shiori/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1694503377
-SHA256 (go/www_shiori/shiori-v1.6.0-rc.1/v1.6.0-rc.1.mod) = e6240837c8c3e3375fdacdade33dccba5af812f2244f151915bea927596ea6dc
-SIZE (go/www_shiori/shiori-v1.6.0-rc.1/v1.6.0-rc.1.mod) = 4561
-SHA256 (go/www_shiori/shiori-v1.6.0-rc.1/v1.6.0-rc.1.zip) = 5304fdc65aceaece9865a647f64659c991c6ebbd39ba601b939d80f3dd69def8
-SIZE (go/www_shiori/shiori-v1.6.0-rc.1/v1.6.0-rc.1.zip) = 6981840
+TIMESTAMP = 1699517557
+SHA256 (go/www_shiori/shiori-v1.6.0-rc.4/v1.6.0-rc.4.mod) = 9408aa9d7835be16771429b0e8905eec4043dba7d7ab058e6c66e4fdd1a61aa6
+SIZE (go/www_shiori/shiori-v1.6.0-rc.4/v1.6.0-rc.4.mod) = 4516
+SHA256 (go/www_shiori/shiori-v1.6.0-rc.4/v1.6.0-rc.4.zip) = a9004fcb51e32146f36eb0e272fc471c5fa1227856455833932d6abf4ff660b6
+SIZE (go/www_shiori/shiori-v1.6.0-rc.4/v1.6.0-rc.4.zip) = 7009464