add .0 to version when necessary to sort better
This commit is contained in:
parent
0a4f9a787f
commit
7be1c2118d
2
.SRCINFO
2
.SRCINFO
|
@ -1,5 +1,5 @@
|
|||
# Generated by mksrcinfo v8
|
||||
# Thu Apr 6 19:33:46 UTC 2017
|
||||
# Wed Apr 12 21:36:13 UTC 2017
|
||||
pkgbase = alpine-git
|
||||
pkgdesc = Fork of the PINE mail client (git)
|
||||
pkgver = 2.21.1.209.a9d7a00
|
||||
|
|
11
PKGBUILD
11
PKGBUILD
|
@ -23,7 +23,16 @@ sha512sums=('SKIP')
|
|||
|
||||
pkgver() {
|
||||
cd "${srcdir}/${gitname}"
|
||||
local ver="$(cat VERSION).$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
|
||||
|
||||
# we recently went
|
||||
# from 2.21.204.5117359
|
||||
# to 2.21.1.209.a9d7a00
|
||||
# which rightfully confused pacman's version ordering
|
||||
# so let's add a .0 to versions with only one dot
|
||||
local v=$(cat VERSION)
|
||||
[[ "$v" =~ ^[^\.]+\.[^\.]+\..*$ ]] || v=$v.0
|
||||
|
||||
local ver="${v}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
|
||||
printf "%s" "${ver//-/.}"
|
||||
}
|
||||
build() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user