summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Nixon2017-01-23 14:11:16 +0000
committerChris Nixon2017-01-23 14:11:16 +0000
commit58db22b8c05b378f1ce029463b12779cfb1c951f (patch)
treeabbc5cc78d253d826f7e31fcff611eeadddb9e90
parentd4b6daa9c93b188b2a563ff9758be9904ef69f35 (diff)
downloadaur-58db22b8c05b378f1ce029463b12779cfb1c951f.tar.gz
Fix the version selection properly
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD6
2 files changed, 5 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ece06b01fb4b..7859dc7507e3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = ripgrep-git
pkgdesc = A search tool that combines the usability of The Silver Searcher with the raw speed of grep.
- pkgver = 0.1.2.6.rb678862
+ pkgver = 0.4.0.0.r057ed63
pkgrel = 1
url = https://github.com/BurntSushi/ripgrep
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index debf296b45ef..e02930160956 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Chris Nixon <chris.nixon@sigma.me.uk>
pkgname=ripgrep-git
-pkgver=0.1.2.6.rb678862
+pkgver=0.4.0.0.r057ed63
pkgrel=1
pkgdesc="A search tool that combines the usability of The Silver Searcher with the raw speed of grep."
arch=('i686' 'x86_64')
@@ -28,11 +28,13 @@ build() {
pkgver() {
cd "$pkgname"
# Get the first part of the latest tag and append the current revision
- echo "$(git describe --long --tags | sed 's/^[a-zA-Z]*[.-]*\(.*\)-.*.*/\1/;s/-/./g').r$(git log --pretty=format:'%h' -n 1)"
+ local tag=$(git tag | grep -v "^[a-zA-Z]" | tail -n1)
+ echo "$(git describe --long $tag | sed 's/^\(.*\)-.*.*/\1/;s/-/./g').r$(git log --pretty=format:'%h' -n 1 $tag)"
}
package() {
cd "$pkgname"
+ git checkout "$(git tag | grep -v "^[a-zA-Z]" | tail -n1)"
install -Dm755 "target/release/rg" "$pkgdir/usr/bin/rg"
install -Dm644 "doc/rg.1" "$pkgdir/usr/share/man/man1/rg.1"