The pkgver()
function is broken because it's allowing beta version tags upstream that are not a valid format for PKGBUILD files that will end up being newer than the final release tags. It can be fixed like this (apply with git am < file.patch
):
From 16aeb5032a5430795601d561f3d1f719dc0e02df Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Tue, 1 Jun 2021 22:10:25 +0300
Subject: [PATCH] Fix versioning so releases will be newer than betas
Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
.SRCINFO | 3 +--
PKGBUILD | 5 +++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.SRCINFO b/.SRCINFO
index e535845..85b6cde 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = roundcubemail-git
pkgdesc = A PHP web-based mail client
- pkgver = 1.4.rc2.r702.ga0fbcf381
+ pkgver = 1.5beta.r100.ge62c0a8
pkgrel = 1
url = https://roundcube.net/
arch = any
@@ -26,4 +26,3 @@ pkgbase = roundcubemail-git
sha256sums = c90981405527ebaf153a407af6b8178b41d078bd4472d63b837b3b4cd5ae36b0
pkgname = roundcubemail-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 086ce5b..5891672 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=roundcubemail-git
-pkgver=1.4.rc2.r702.ga0fbcf381
+pkgver=1.5beta.r100.ge62c0a8
pkgrel=1
pkgdesc="A PHP web-based mail client"
arch=('any')
@@ -21,7 +21,8 @@ sha256sums=('SKIP'
pkgver() {
cd "roundcubemail"
- git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ git describe --long --tags --abbrev=7 HEAD |
+ sed 's/-beta/beta/g;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
--
2.31.1
Pinned Comments
cgirard commented on 2021-07-12 14:14 (UTC)
Please note that with today change, for people pushing the built package to a (local) repo, it will probably not be automatically updated as
1.5rc.rx
<1.5.rc.rx
.