Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/common.sh
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2022-09-11 12:31:39 +0200
committerLevente Polyak <anthraxx@archlinux.org>2023-03-19 22:02:04 +0100
commitb9d20c10a988775bc444ceaf872766fec32b54b5 (patch)
treebfbd8cc4c4f5381ea8d22049f98dbf2128c6c3c9 /lib/common.sh
parent184441895606f59dc85c695c627660758ca2b882 (diff)
archrelease: fix git tag conversion and use library function for it
This allows us to reuse the code and have the conversion in a single place instead of cluttering rules across different execution units. It also fixes the implementations according to the specs of git-check-ref-format. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'lib/common.sh')
-rw-r--r--lib/common.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/common.sh b/lib/common.sh
index d345307..577bb6e 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -255,6 +255,16 @@ getpkgdesc() {
}
+get_tag_from_pkgver() {
+ local pkgver=$1
+ local tag=${pkgver}
+
+ tag=${tag/:/-}
+ tag=${tag//~/.}
+ echo "${tag}"
+}
+
+
is_debug_package() {
local pkgfile=${1} pkgbase pkgname pkgdesc
pkgbase="$(getpkgbase "${pkgfile}")"