dotnetCorePackages.dotnet_{8..10}.vmr: fallback to bootstrap pre-release with same sdk version
This is necessary because there aren't official releases of all the SDKs listed in global.json.
This commit is contained in:
@@ -157,8 +157,17 @@ writeScript "update-dotnet-vmr.sh" ''
|
||||
"artifactsHash": $_2,
|
||||
}' > "${toOutputPath releaseInfoFile}"
|
||||
|
||||
${lib.escapeShellArg (toOutputPath ./update.sh)} \
|
||||
-o ${lib.escapeShellArg (toOutputPath bootstrapSdkFile)} --sdk "$sdkVersion" >&2
|
||||
updateSDK() {
|
||||
${lib.escapeShellArg (toOutputPath ./update.sh)} \
|
||||
-o ${lib.escapeShellArg (toOutputPath bootstrapSdkFile)} --sdk "$1" >&2
|
||||
}
|
||||
|
||||
updateSDK "$sdkVersion" || if [[ $? == 2 ]]; then
|
||||
>&2 echo "WARNING: bootstrap sdk missing, attempting to bootstrap with self"
|
||||
updateSDK "$(jq -er .sdkVersion "$tmp"/release.json)"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$(nix-build -A $UPDATE_NIX_ATTR_PATH.fetch-deps --no-out-link) >&2
|
||||
)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
set -Eeuo pipefail
|
||||
shopt -s inherit_errexit
|
||||
|
||||
trap 'exit 1' ERR
|
||||
|
||||
rids=({linux-{,musl-}{arm,arm64,x64},osx-{arm64,x64},win-{arm64,x64,x86}})
|
||||
|
||||
release () {
|
||||
@@ -225,6 +227,11 @@ usage () {
|
||||
echo "Usage: $pname [[--sdk] [-o output] sem-version] ...
|
||||
Get updated dotnet src (platform - url & sha512) expressions for specified versions
|
||||
|
||||
Exit codes:
|
||||
0 Success
|
||||
1 Failure
|
||||
2 Release not found
|
||||
|
||||
Examples:
|
||||
$pname 6.0.14 7.0.201 - specific x.y.z versions
|
||||
$pname 6.0 7.0 - latest x.y versions
|
||||
@@ -256,11 +263,13 @@ update() {
|
||||
major_minor=$(sed 's/^\([0-9]*\.[0-9]*\).*$/\1/' <<< "$sem_version")
|
||||
content=$(curl -fsSL https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/"$major_minor"/releases.json)
|
||||
if [[ -n $sdk ]]; then
|
||||
trap '' ERR
|
||||
major_minor_patch=$(
|
||||
jq -er --arg version "$sem_version" '
|
||||
.releases[] |
|
||||
select(.sdks[].version == $version) |
|
||||
."release-version"' <<< "$content")
|
||||
."release-version"' <<< "$content" || if [[ $? == 4 ]]; then exit 2; else exit 1; fi)
|
||||
trap 'exit 1' ERR
|
||||
else
|
||||
major_minor_patch=$([ "$patch_specified" == true ] && echo "$sem_version" || jq -er '."latest-release"' <<< "$content")
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user