From 723934fa3d7814f5a871124b802e3d863f8024b2 Mon Sep 17 00:00:00 2001 From: Guillaume Da Silva Date: Thu, 22 Jan 2026 17:42:21 +0100 Subject: [PATCH] fix: Inject version into binary during AUR build The PKGBUILD was building the binary without injecting the version string, causing the CLI to default to "unknown" version. This resulted in semver parsing errors when running 'qovery version' command on ArchLinux installations via AUR. The build now uses ldflags to inject the version from $pkgver into the utils.Version variable, matching the behavior of GoReleaser builds. Fixes the error: "error trying to get semver from raw string `unknown`" --- PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKGBUILD b/PKGBUILD index 49549dc1..246ce790 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -16,7 +16,7 @@ build() { export CGO_CXXFLAGS="${CXXFLAGS}" export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" export CGO_ENABLED=0 - go build -o $pkgname main.go + go build -ldflags "-X github.com/qovery/qovery-cli/utils.Version=$pkgver" -o $pkgname main.go } package() {