summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorHanabishi2021-12-08 01:12:51 +0500
committerHanabishi2021-12-08 01:12:51 +0500
commite43596b4da51b3d3c7fdf624eaa29ea8ca49e5e6 (patch)
tree00f7c69ad1faf2d605da4578c113664b6705ed59 /PKGBUILD
parent26949e04aded91dc88bef5da012cc75033e9bc82 (diff)
downloadaur-e43596b4da51b3d3c7fdf624eaa29ea8ca49e5e6.tar.gz
Improve pkgver request
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD4
1 files changed, 3 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c042f909fa92..58fbddb88807 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -41,7 +41,9 @@ _base="8bb7eca972ad531c9b149c0a51ab43a417385813"
pkgver() {
cd "${srcdir}/repo"
- local rev=$(curl "https://api.github.com/repos/${_repo}/compare/${_base}...${_branch}" | perl -ne'/"total_commits":\s?(\d+),?/ && print $1')
+ local rev=$(curl -sS "https://api.github.com/repos/${_repo}/compare/${_base}...${_branch}" | perl -ne'/"total_commits":\s?(\d+),?/ && print $1')
+ test "${rev}"
+
local sha=$(git rev-parse HEAD)
echo "${_ver}.r${rev}.g${sha:0:7}"
}