diff options
author | Vignesh Krishnamoorthy | 2016-11-03 17:08:46 +0100 |
---|---|---|
committer | Vignesh Krishnamoorthy | 2016-11-03 17:08:46 +0100 |
commit | bc5dcef65864c3d592c2ea80c0b324d0c9870f9a (patch) | |
tree | 8c3ace0d46200df2abc7dafbfc904e5706fa56db | |
parent | 0647810f156e97e6b28ccb7a56d385f1b407b82f (diff) | |
download | aur-bc5dcef65864c3d592c2ea80c0b324d0c9870f9a.tar.gz |
Update version from tags. Fallback to setup.py on no tags.
-rw-r--r-- | PKGBUILD | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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() { |