dev-ml/ollama: fix --version

Closes https://github.com/gentoo/guru/pull/205

Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
This commit is contained in:
Vitaly Zdanevich
2024-07-08 08:25:07 +04:00
parent 0d7cb6f959
commit f0eb17f754

View File

@@ -42,6 +42,12 @@ src_unpack() {
}
src_compile() {
VERSION=$(
git describe --tags --first-parent --abbrev=7 --long --dirty --always \
| sed -e "s/^v//g"
)
export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$VERSION\"'"
ego generate ./...
ego build .
}