Fix pkgver() and add tests

This commit is contained in:
Phillip Dykman 2026-02-19 22:36:11 -08:00
parent eee6d8965c
commit 732811f3fc
2 changed files with 11 additions and 5 deletions

View file

@ -1,6 +1,6 @@
pkgbase = zoekt-git
pkgdesc = Fast trigram based code search
pkgver = 90faf6de
pkgver = r1881.c747a3b
pkgrel = 1
url = https://github.com/sourcegraph/zoekt
arch = i686
@ -12,6 +12,12 @@ pkgbase = zoekt-git
makedepends = go
makedepends = git
provides = zoekt
options = strip
options = docs
options = !libtool
options = !staticlibs
options = !lto
options = !debug
source = zoekt::git+https://github.com/sourcegraph/zoekt
sha256sums = SKIP

View file

@ -2,7 +2,7 @@
_pkgname=zoekt
pkgname=zoekt-git
pkgbase=zoekt-git
pkgver=90faf6de
pkgver=r1881.c747a3b
pkgrel=1
pkgdesc='Fast trigram based code search'
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
@ -12,11 +12,11 @@ makedepends=('go' 'git')
source=("$_pkgname::git+$url")
sha256sums=('SKIP')
provides=(zoekt)
OPTIONS=(strip docs !libtool !staticlibs !lto)
options=(strip docs !libtool !staticlibs !lto !debug)
pkgver() {
cd "$_pkgname"
git describe --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
prepare() {
@ -36,7 +36,7 @@ build() {
check() {
cd "$_pkgname"
# go test ./...
go test -v ./...
}
package() {