From f0946c65f52eab3a82c55c04d76ac3bb7e81bbb1 Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Wed, 16 Sep 2020 00:17:55 +0200 Subject: archrelease: Added pkgver to git tag conversion Signed-off-by: Morten Linderud --- src/archrelease.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/archrelease.in b/src/archrelease.in index 55d3726..0d37eb2 100644 --- a/src/archrelease.in +++ b/src/archrelease.in @@ -37,16 +37,17 @@ fi . ./PKGBUILD pkgbase=${pkgbase:-$pkgname} pkgver=$(get_full_version "$pkgbase") +tag_pkgver=release-${pkgver/:/-} -if git rev-parse "$pkgver" >/dev/null 2>&1; then +if git rev-parse "$tag_pkgver" >/dev/null 2>&1; then die "archrelease: the tag $pkgver already exists in the repository!" fi # If the tag exists we check if it's properly signed and that it # matches the working directory PKGBUILD. -if git tag --verify "$pkgver" &> /dev/null; then +if git tag --verify "$tag_pkgver" &> /dev/null; then cwd_checksum=$(sha256sum PKGBUILD|cut -d' ' -f1) - tag_checksum=$(git show $pkgver:PKGBUILD | sha256sum |cut -d' ' -f1) + tag_checksum=$(git show $tag_pkgver:PKGBUILD | sha256sum |cut -d' ' -f1) if [[ "$cwd_checksum" != "$tag_checksum" ]]; then die "tagged PKGBUILD is not the same as the working dir PKGBUILD" fi @@ -55,6 +56,6 @@ fi stat_busy "Releasing package" printf -v tag_list ", %s" "$@"; tag_list="${tag_list#, }" -git tag -s -m "archrelease: released $pkgbase-$pkgver to $tag_list" "$pkgver" || abort +git tag -s -m "archrelease: released $pkgbase-$pkgver to $tag_list" "$tag_pkgver" || abort git push --tags || abort stat_done -- cgit v1.2.3-70-g09d2