summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorДамјан Георгиевски2019-12-27 17:01:03 +0100
committerДамјан Георгиевски2019-12-27 17:01:22 +0100
commit012f6056642c0d75742311738c310315e2270238 (patch)
treec6582c1028c56907569249133c4414fd4aa25c4e
parent29e57dc227e7e60f680ca0bd6d1a69120289ff63 (diff)
downloadaur-012f6056642c0d75742311738c310315e2270238.tar.gz
update pkgver() to include tags in the version
used the last variant from https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD13
2 files changed, 9 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d3215c8d89..1139fb5352c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = firecracker-git
pkgdesc = Secure and fast microVMs for serverless computing
- pkgver = r1496.effaab05
+ pkgver = v0.20.0.r4.g144b6c08
pkgrel = 1
url = https://github.com/firecracker-microvm/firecracker
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 01386cf9d9e..ae17c76680b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=firecracker-git
_gitname=firecracker
-pkgver=r1496.effaab05
+pkgver=v0.20.0.r4.g144b6c08
pkgrel=1
pkgdesc="Secure and fast microVMs for serverless computing"
url="https://github.com/firecracker-microvm/firecracker"
@@ -12,17 +12,20 @@ source=("git+https://github.com/firecracker-microvm/firecracker.git")
sha256sums=('SKIP')
pkgver() {
- cd "${srcdir}/${_gitname}"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd ${_gitname}
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}
build() {
- cd "${srcdir}/${_gitname}"
+ cd ${_gitname}
tools/devtool build --release
}
package() {
- cd "${srcdir}/${_gitname}"
+ cd ${_gitname}
toolchain="$(uname -m)-unknown-linux-musl"
install -Dm755 build/cargo_target/${toolchain}/release/firecracker "$pkgdir/usr/bin/firecracker"
install -Dm755 build/cargo_target/${toolchain}/release/jailer "$pkgdir/usr/bin/jailer"