diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
commit | 5423cabbbf2b6dec5568f1ecabd288d5d9a642ec (patch) | |
tree | f316a6a921bfefd3a63bd4502c2eb50ff1644f67 /nixpkgs/pkgs/development/compilers/dotnet/update.nix | |
parent | 46a88117a05c3469af5d99433af140c3de8ca088 (diff) | |
parent | 8aa81f34981add12aecada6c702ddbbd0375ca36 (diff) | |
download | nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.gz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.bz2 nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.lz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.xz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.zst nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/dotnet/update.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/dotnet/update.nix | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/update.nix b/nixpkgs/pkgs/development/compilers/dotnet/update.nix index 89291d2461d8..29206ecbe768 100644 --- a/nixpkgs/pkgs/development/compilers/dotnet/update.nix +++ b/nixpkgs/pkgs/development/compilers/dotnet/update.nix @@ -50,7 +50,6 @@ in writeScript "update-dotnet-vmr.sh" '' .draft == false and (.name | startswith(".NET ${channel}")))) | first | ( - .name, .tag_name, (.assets | .[] | @@ -67,26 +66,29 @@ in writeScript "update-dotnet-vmr.sh" '' curl -fsL https://api.github.com/repos/dotnet/dotnet/releases | \ jq -r "$query" \ ) | ( - read name read tagName read releaseUrl read sigUrl - if [[ "$name" == ".NET ${release}" ]]; then - >&2 echo "release is already $name" - exit - fi - tmp="$(mktemp -d)" trap 'rm -rf "$tmp"' EXIT + cd "$tmp" + + curl -fsL "$releaseUrl" -o release.json + release=$(jq -r .release release.json) + + if [[ "$release" == "${release}" ]]; then + >&2 echo "release is already $release" + exit + fi + tarballUrl=https://github.com/dotnet/dotnet/archive/refs/tags/$tagName.tar.gz mapfile -t prefetch < <(nix-prefetch-url --print-path "$tarballUrl") tarballHash=$(nix-hash --to-sri --type sha256 "''${prefetch[0]}") tarball=''${prefetch[1]} - cd "$tmp" curl -L "$sigUrl" -o release.sig export GNUPGHOME=$PWD/.gnupg @@ -118,6 +120,6 @@ in writeScript "update-dotnet-vmr.sh" '' "artifactsHash": $_2, }' > "${toString releaseInfoFile}" - curl -fsL "$releaseUrl" -o ${toString releaseManifestFile} + cp release.json "${toString releaseManifestFile}" ) '' |