PKGBUILD: add commit count in pkgver

This commit is contained in:
BigfootACA 2024-05-28 10:20:26 +08:00
parent 37439927f7
commit f4244da739
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
pkgbase = linux-ayn-odin2-edge
pkgver = 6.8.0.cc6089c03c04
pkgrel = 1
pkgrel = 2
url = https://github.com/edk2-porting/linux-next/
arch = aarch64
license = GPL2

View File

@ -2,7 +2,7 @@
pkgbase=linux-ayn-odin2-edge
pkgver=6.8.0.cc6089c03c04
pkgrel=1
pkgrel=2
arch=(aarch64)
url="https://github.com/edk2-porting/linux-next/"
license=(GPL2)
@ -50,10 +50,11 @@ pkgver() {
local VERSION="$(awk '$1=="VERSION"{print $3}' Makefile)"
local PATCHLEVEL="$(awk '$1=="PATCHLEVEL"{print $3}' Makefile)"
local SUBLEVEL="$(awk '$1=="SUBLEVEL"{print $3}' Makefile)"
local COMMITNO=".r$(git rev-list --count HEAD)"
local EXTRAVERSION="$(awk '$1=="EXTRAVERSION"{print $3}' Makefile)"
local COMMIT="$(git rev-parse --short=12 HEAD)"
EXTRAVERSION="${EXTRAVERSION//-/.}"
echo "${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}.${COMMIT}"
echo "${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${COMMITNO}${EXTRAVERSION}.${COMMIT}"
}
prepare() {