summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Breitwieser2021-08-02 13:28:55 +0200
committerOliver Breitwieser2021-08-02 13:29:04 +0200
commit95aa684d7db12b47184f7e2c98ecc67c9a44a902 (patch)
tree3ffa2a8566f73eb65ae736546020fd490d6532be
parentb5fa2584493ff4e311ac10830fcbab04882d5f30 (diff)
downloadaur-95aa684d7db12b47184f7e2c98ecc67c9a44a902.tar.gz
asfa-git: Improve diff between version info
In particular: Have binary and package version only differ in one character.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD12
2 files changed, 8 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4e5e5091bbce..8f37c2b06c14 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = asfa-git
pkgdesc = share files by upload via ssh and generation of a non-guessable link
pkgver = 0.8.0.r16.g89c4c83
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/obreitwi/asfa
arch = x86_64
license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index 754b89329929..0e3d7ba6d2ff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=asfa
pkgname=${_pkgname}-git
pkgver=0.8.0.r16.g89c4c83
-pkgrel=1
+pkgrel=2
pkgdesc='share files by upload via ssh and generation of a non-guessable link'
arch=('x86_64')
url="https://github.com/obreitwi/asfa"
@@ -23,17 +23,19 @@ pkgver() {
cd $_oldpwd
}
-# version string that is accepted by cargo
+# version string that is accepted by cargo
_cargo_version() {
local _oldpwd
_oldpwd="$PWD"
cd "$srcdir/$_pkgname"
- printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/')"
+ printf "%s" "$(git describe --long --tags \
+ | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/\([^-]*\)-\([^-]*\)$/\1.\2/')"
cd $_oldpwd
}
-# ensure that the asfa binary contains the (almost) same git-based version
-# information as the installed package
+# Ensure that the asfa binary contains the (almost) same git-based version
+# information as the installed package.
+# Only difference: dash after minor version.
_ensure_version_information() {
local _version
_version="$(_cargo_version)"