From 1b1a62faee78a8989d82b9b521dd67546dfcbd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olav=20R=C3=B8nnestad=20Birkeland?= <6450056+o-l-a-v@users.noreply.github.com> Date: Thu, 13 Mar 2025 16:08:37 +0100 Subject: [PATCH 1/3] Add dotnet-install --- bucket/dotnet-install.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 bucket/dotnet-install.json diff --git a/bucket/dotnet-install.json b/bucket/dotnet-install.json new file mode 100644 index 0000000000000..b820885c2110c --- /dev/null +++ b/bucket/dotnet-install.json @@ -0,0 +1,30 @@ +{ + "##": [ + "dotnet-install.ps1 is not versioned, version is created from metadata from a REST HEAD request.", + "* See: .", + "Source is available on GitHub, but it's not signed. Thus using Microsoft official URL.", + "dotnet-install.ps1 is not in PowerShell Gallery.", + "* See: ." + ], + "version": "2025.02.11.161846-fd134bd16e2247c230b85bebbe135a63", + "description": "Microsoft official dotnet CLI and SDK install script", + "homepage": "https://github.com/dotnet/install-scripts", + "license": "MIT", + "url": "https://dot.net/v1/dotnet-install.ps1", + "hash": "2b32cef94919665b01f46cfc71454bd8ea468e3754d0357a7e9e229cdc11eb8b", + "bin": "dotnet-install.ps1", + "checkver": { + "regex": "([\\d.]+-[a-f0-9]{32})", + "script": [ + "$null = Invoke-RestMethod -Method 'Head' -Uri 'https://dot.net/v1/dotnet-install.ps1' -ResponseHeadersVariable 'ResponseHeaders'", + "[string]::Format(", + " '{0}-{1}',", + " [datetime]::Parse($ResponseHeaders.'Last-Modified'[0]).ToUniversalTime().ToString('yyyy\\.MM\\.dd\\.HHmmss'),", + " [BitConverter]::ToString([System.Convert]::FromBase64String($ResponseHeaders.'Content-MD5')).Replace('-','').ToLower()", + ")" + ] + }, + "autoupdate": { + "url": "https://dot.net/v1/dotnet-install.ps1" + } +} From cc84c6f06b93a40eb6db89569e4a2e2bc0c012a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olav=20R=C3=B8nnestad=20Birkeland?= <6450056+o-l-a-v@users.noreply.github.com> Date: Thu, 13 Mar 2025 16:45:00 +0100 Subject: [PATCH 2/3] Use Invoke-WebRequest to get response headers for 5.1 compatibility --- bucket/dotnet-install.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucket/dotnet-install.json b/bucket/dotnet-install.json index b820885c2110c..b5a290782bec0 100644 --- a/bucket/dotnet-install.json +++ b/bucket/dotnet-install.json @@ -16,7 +16,7 @@ "checkver": { "regex": "([\\d.]+-[a-f0-9]{32})", "script": [ - "$null = Invoke-RestMethod -Method 'Head' -Uri 'https://dot.net/v1/dotnet-install.ps1' -ResponseHeadersVariable 'ResponseHeaders'", + "$ResponseHeaders = (Invoke-WebRequest -Method 'Head' -Uri 'https://dot.net/v1/dotnet-install.ps1').'Headers'", "[string]::Format(", " '{0}-{1}',", " [datetime]::Parse($ResponseHeaders.'Last-Modified'[0]).ToUniversalTime().ToString('yyyy\\.MM\\.dd\\.HHmmss'),", From 3aeed0e736fb20a47e1aecbe3bff7d7c59a8c919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olav=20R=C3=B8nnestad=20Birkeland?= <6450056+o-l-a-v@users.noreply.github.com> Date: Fri, 27 Jun 2025 12:38:44 +0200 Subject: [PATCH 3/3] Update dotnet-install.json --- bucket/dotnet-install.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bucket/dotnet-install.json b/bucket/dotnet-install.json index b5a290782bec0..e715c98df496d 100644 --- a/bucket/dotnet-install.json +++ b/bucket/dotnet-install.json @@ -4,19 +4,21 @@ "* See: .", "Source is available on GitHub, but it's not signed. Thus using Microsoft official URL.", "dotnet-install.ps1 is not in PowerShell Gallery.", - "* See: ." + "* See: .", + "Redirect from 'https://dot.net/v1/dotnet-install.ps1' to 'https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1' is sometimes very slow", + "* Thus using 'builds.dotnet.microsoft.com' directly instead, which is not likely to change any time soon." ], - "version": "2025.02.11.161846-fd134bd16e2247c230b85bebbe135a63", + "version": "2025.06.16.182847-11e9649f6a6b3f8f415d10fc920e9350", "description": "Microsoft official dotnet CLI and SDK install script", "homepage": "https://github.com/dotnet/install-scripts", "license": "MIT", - "url": "https://dot.net/v1/dotnet-install.ps1", - "hash": "2b32cef94919665b01f46cfc71454bd8ea468e3754d0357a7e9e229cdc11eb8b", + "url": "https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1", + "hash": "c437c543c98ee5bc9cfac6c627c18871a35020d8e3623c06eec0694c92531357", "bin": "dotnet-install.ps1", "checkver": { "regex": "([\\d.]+-[a-f0-9]{32})", "script": [ - "$ResponseHeaders = (Invoke-WebRequest -Method 'Head' -Uri 'https://dot.net/v1/dotnet-install.ps1').'Headers'", + "$ResponseHeaders = (Invoke-WebRequest -Method 'Head' -Uri 'https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1').'Headers'", "[string]::Format(", " '{0}-{1}',", " [datetime]::Parse($ResponseHeaders.'Last-Modified'[0]).ToUniversalTime().ToString('yyyy\\.MM\\.dd\\.HHmmss'),", @@ -25,6 +27,6 @@ ] }, "autoupdate": { - "url": "https://dot.net/v1/dotnet-install.ps1" + "url": "https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1" } }