fix(radar): inject correct build version via ldflags
Some checks failed
CI / check (pull_request) Has been cancelled

Version was showing as "dev" instead of "v1.5.14" because ldflags
targeted the wrong variable. Changed from internal/version.Current
to main.version which is the variable actually used by cmd/explorer.
This commit is contained in:
2026-05-11 18:49:47 +03:00
parent 3b0bc435c4
commit cbaa6b6bca

View File

@@ -6,13 +6,13 @@
}:
let
version = "1.5.10";
version = "1.5.14";
src = fetchFromGitHub {
owner = "skyhook-io";
repo = "radar";
rev = "v${version}";
hash = "sha256-Xvn1dDqCaBlXY/XD2GoWBDECMhxFlYCGlnVinLR/c1A=";
hash = "sha256-/TebJGe672kefEci2WuDWw31ivGiMImxQCcWIzJ8pQE=";
};
# Build the frontend as a separate derivation.
@@ -75,7 +75,7 @@ buildGoModule {
pname = "radar";
inherit version src;
vendorHash = "sha256-bmS4nRzVG4ZmpV3kq2Ih8uerRWL5weq0KP54jT3sh5I=";
vendorHash = "sha256-86+KD+MTiBh+Nw64suCWCkv90/+FXUKWiv1CS2EWTpw=";
# Copy pre-built frontend assets before Go compilation for go:embed
preBuild = ''
@@ -85,6 +85,12 @@ buildGoModule {
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X main.version=v${version}"
];
subPackages = [ "cmd/explorer" ];
doCheck = false;