dapr-cli: adds version information with build flags

Signed-off-by: joshvanl <me@joshvanl.dev>
This commit is contained in:
joshvanl 2023-01-09 14:32:23 +00:00
parent 75820c9e4a
commit 95abc8a503

View file

@ -19,6 +19,13 @@ buildGoModule rec {
export HOME=$(mktemp -d)
'';
ldflags = [
"-X main.version=${version}"
"-X main.apiVersion=1.0"
"-X github.com/dapr/cli/pkg/standalone.gitcommit=${src.rev}"
"-X github.com/dapr/cli/pkg/standalone.gitversion=${version}"
];
postInstall = ''
mv $out/bin/cli $out/bin/dapr
@ -31,7 +38,7 @@ buildGoModule rec {
description = "A CLI for managing Dapr, the distributed application runtime";
homepage = "https://dapr.io";
license = licenses.mit;
maintainers = with maintainers; [ lucperkins ];
maintainers = with maintainers; [ joshvanl lucperkins ];
mainProgram = "dapr";
};
}