summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVignesh Krishnamoorthy2016-11-03 17:08:46 +0100
committerVignesh Krishnamoorthy2016-11-03 17:08:46 +0100
commitbc5dcef65864c3d592c2ea80c0b324d0c9870f9a (patch)
tree8c3ace0d46200df2abc7dafbfc904e5706fa56db
parent0647810f156e97e6b28ccb7a56d385f1b407b82f (diff)
downloadaur-bc5dcef65864c3d592c2ea80c0b324d0c9870f9a.tar.gz
Update version from tags. Fallback to setup.py on no tags.
-rw-r--r--PKGBUILD5
1 files changed, 2 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e74d50567ff..8754d10266f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,14 +18,13 @@ conflicts=('autoenv')
pkgver() {
cd "$pkgname"
set -o pipefail
- # git describe --tags --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
+ git describe --tags --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
# If there is a setup.py then pull the version tag from the file
if [ -f "setup.py" ]; then
- printf "%s." "$(grep -R "version=" setup.py | awk -F\' '{print $2}')"
+ printf "%s.r%s.g%s" "$(grep -R "version=" setup.py | awk -F\' '{print $2}')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
fi
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {