mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
turso-cli: Use ldflags to set the version instead of embedding
This commit is contained in:
parent
ca95f89a74
commit
5d77e9448a
@ -21,12 +21,9 @@ buildGo121Module rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
# Build with production code
|
||||
tags = ["prod"];
|
||||
# Include version for `turso --version` reporting
|
||||
preBuild = ''
|
||||
echo "v${version}" > internal/cmd/version.txt
|
||||
'';
|
||||
ldflags = [
|
||||
"-X github.com/tursodatabase/turso-cli/internal/cmd.version=v${version}"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
|
Loading…
Reference in New Issue
Block a user