apple-sdk: fix JSON handling in lock-sdk-deps.sh

This was omitting the SDK version from the structure, probably due
to refactors in response to my own reviews on the SDK rework PR. Oops!
This commit is contained in:
Emily 2024-10-11 06:16:58 +01:00
parent 05cf0c40b8
commit 29e87ecdd4

View File

@ -60,7 +60,7 @@ for package in "${packages[@]}"; do
packageHash=$(nix --extra-experimental-features nix-command hash path "$package-$packageTag")
pkgsjson="{\"$package\": {\"version\": \"$packageVersion\", \"hash\": \"$packageHash\"}}"
pkgsjson="{\"$sdkVersion\": {\"$package\": {\"version\": \"$packageVersion\", \"hash\": \"$packageHash\"}}}"
echo " - Locking $package to version $packageVersion with hash '$packageHash'"
jq --argjson pkg "$pkgsjson" -S '. * $pkg' "$lockfile" | sponge "$lockfile"