cdktf-cli: fix version

Why
===
* `cdktf-cli --version` returned '0.0.0'

What changed
===
* Run align-version like they do in the github actions release to get
the version right
* Add versionCheckHook to avoid regressions

Test plan
===
```
[~/p/nixpkgs]$ ./result/bin/cdktf --version
0.21.0
```
This commit is contained in:
Ryan Mulligan
2025-11-26 07:17:07 -08:00
parent 2f92a73340
commit abdc3e66bc
+6
View File
@@ -14,6 +14,7 @@
removeReferencesTo,
testers,
yarn,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -101,6 +102,8 @@ stdenv.mkDerivation (finalAttrs: {
buildPhase = ''
runHook preBuild
bash ./tools/align-version.sh
faketty yarn --offline build
runHook postBuild
@@ -139,6 +142,9 @@ stdenv.mkDerivation (finalAttrs: {
"$out/lib/node_modules/cdktf-cli/node_modules/@cdktf/hcl2json/main.wasm"
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;