From b9d20c10a988775bc444ceaf872766fec32b54b5 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Sun, 11 Sep 2022 12:31:39 +0200 Subject: 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 --- lib/common.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/common.sh') 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}")" -- cgit v1.2.3-54-g00ecf