summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfelics2019-02-21 13:56:06 +0100
committerfelics2019-02-21 13:56:06 +0100
commit7e9dc9312b056e6cd8fdf05e957301e34b332df5 (patch)
tree706764fdf5695a16b977ca7e088436dd2529982e
parent7de2b973d2db84277b3f955ef4768e4547fd65eb (diff)
downloadaur-7e9dc9312b056e6cd8fdf05e957301e34b332df5.tar.gz
Made the $pkgver scheme monotouneously increading.
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD26
2 files changed, 23 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 71b8c7b28739..4ec8e6d03b43 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,8 @@
pkgbase = audible-activator-git
pkgdesc = A script to retrieve your activation data (activation_bytes) from Audible servers. Use it to play your aax or aax+ files downloaded from amazon audible. Needs chrome or chromium.
- pkgver = 0.2.rg2e97c84
+ pkgver = 0.2+r3.20181128.2e97c84
pkgrel = 1
+ epoch = 1
url = http://github.com/inAudible-NG/audible-activator
arch = any
license = GPL3
@@ -10,9 +11,9 @@ pkgbase = audible-activator-git
depends = python2-selenium
depends = python2-urllib3
depends = chromium
- provides = audible-activator=0.2.rg2e97c84
+ provides = audible-activator=0.2+r3.20181128.2e97c84
conflicts = audible-activator
- replaces = audible-activator<=0.2.rg2e97c84
+ replaces = audible-activator<=0.2+r3.20181128.2e97c84
source = audible-activator::git+https://github.com/inAudible-NG/audible-activator
source = audible-activator.chromedriverpath.patch
source = audible-activator.sh
diff --git a/PKGBUILD b/PKGBUILD
index f6fe60120082..b0e294bcfd8d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,8 @@
_pkgname='audible-activator'
pkgname="${_pkgname}-git"
-pkgver=0.2.rg2e97c84
+epoch=1
+pkgver=0.2+r3.20181128.2e97c84
pkgrel=1
pkgdesc="A script to retrieve your activation data (activation_bytes) from Audible servers. Use it to play your aax or aax+ files downloaded from amazon audible. Needs chrome or chromium."
url='http://github.com/inAudible-NG/audible-activator'
@@ -62,8 +63,9 @@ pkgver() {
cd "${srcdir}/${_pkgname}"
_ver="$(./audible-activator.py --version | awk '{print $2}')"
-
- _rev="$(git ls-remote | head -n1 | head -c7)"
+ _rev="$(git rev-list --count HEAD)"
+ _date="$(git log -n 1 --format=tformat:%ci | awk '{print $1}' | tr -d '-')"
+ _hash="$(git rev-parse --short HEAD)"
if [ -z "${_ver}" ]; then
echo "$0: Error: Could not determine version." >&2
@@ -72,14 +74,24 @@ pkgver() {
fi
if [ -z "${_rev}" ]; then
- echo "$0: Error: Could not determine SVN revision." >&2
+ echo "$0: Error: Could not determine git commit count." >&2
+ false
+ return 1
+ fi
+
+ if [ -z "${_hash}" ]; then
+ echo "$0: Error: Could not determine latest git commit hash." >&2
+ false
+ return 1
+ fi
+
+ if [ -z "${_date}" ]; then
+ echo "$0: Error: Could not determine latest git commit date." >&2
false
return 1
- else
- _rev="g${_rev}"
fi
- echo "${_ver}.r${_rev}"
+ echo "${_ver}+r${_rev}.${_date}.${_hash}"
}
package() {