kubebuilder: buildFlagsArray -> ldflags

This commit is contained in:
zowoq 2021-08-20 17:12:13 +10:00
parent 58c665d96c
commit dd07491333

View file

@ -20,13 +20,13 @@ buildGoModule rec {
subPackages = ["cmd"];
preBuild = ''
export buildFlagsArray+=("-ldflags=-X main.kubeBuilderVersion=v${version} \
-X main.goos=$GOOS \
-X main.goarch=$GOARCH \
-X main.gitCommit=v${version} \
-X main.buildDate=v${version}")
'';
ldflags = [
"-X main.kubeBuilderVersion=v${version}"
"-X main.goos=${go.GOOS}"
"-X main.goarch=${go.GOARCH}"
"-X main.gitCommit=v${version}"
"-X main.buildDate=v${version}"
];
doCheck = true;