Unverified Commit d53327cc authored by zowoq's avatar zowoq Committed by GitHub
Browse files

dotnet/update.nix: fix update of sdk without bootstrap (#502343)

parents fb6c1561 4daf4c7a
Loading
Loading
Loading
Loading
+144 −140
Original line number Diff line number Diff line
@@ -57,7 +57,8 @@ let
    lib.path.removePrefix root path;

in
writeScript "update-dotnet-vmr.sh" ''
writeScript "update-dotnet-vmr.sh" (
  ''
    #! ${nix}/bin/nix-shell
    #! nix-shell -i ${runtimeShell} --pure ${drv} --keep UPDATE_NIX_ATTR_PATH
    set -euo pipefail
@@ -182,7 +183,8 @@ writeScript "update-dotnet-vmr.sh" ''
                "artifactsUrl": $_1,
                "artifactsHash": $_2,
            }' > "${toOutputPath releaseInfoFile}"

  ''
  + lib.optionalString (bootstrapSdkFile != null) ''
    updateSDK() {
        ${lib.escapeShellArg (toOutputPath ./update.sh)} \
            -o ${lib.escapeShellArg (toOutputPath bootstrapSdkFile)} --sdk "$1" >&2
@@ -194,7 +196,9 @@ writeScript "update-dotnet-vmr.sh" ''
    else
        exit 1
    fi

  ''
  + ''
        $(nix-build -A $UPDATE_NIX_ATTR_PATH.fetch-deps --no-out-link) >&2
    )
  ''
)