Skip to content

Commit aa9ad57

Browse files
committed
Add support for bare sha files
1 parent 413bf2d commit aa9ad57

File tree

110 files changed

+612
-808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+612
-808
lines changed

eng/dockerfile-templates/Dockerfile.windows.install-dotnet

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,53 @@
1414
set dotnetFileParts to split(ARGS["download-path"], "/") ^
1515
set dotnetFileName to dotnetFileParts[len(dotnetFileParts) - 1] ^
1616

17-
set dotnetFileVariable to "$dotnetFile" ^
1817
set extractDir to when(ARGS["extract-dir"], ARGS["extract-dir"], "dotnet") ^
1918

20-
set checksumsFilePath to VARIABLES[cat("dotnet|", dotnetVersion, "|aggregate-checksums")] ^
21-
set checksumsFileParts to split(checksumsFilePath, "/") ^
22-
set checksumsFileName to checksumsFileParts[len(checksumsFileParts) - 1] ^
23-
2419
set baseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|", VARIABLES["branch"])] ^
2520
set downloadUrl to cat(baseUrl, ARGS["download-path"]) ^
2621

22+
set useAggregateChecksums to (dotnetVersion = "8.0" || dotnetVersion = "9.0") ^
2723
set checksumsBaseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|checksums|", VARIABLES["branch"])] ^
28-
set checksumsUrl to cat(checksumsBaseUrl, checksumsFilePath)
24+
25+
set dotnetFileVariable to "$dotnetFile" ^
26+
set checksumFileVariable to when(useAggregateChecksums, "$dotnetChecksumsFile", "$dotnetSha512File") ^
27+
28+
if (useAggregateChecksums):{{
29+
set checksumsFilePath to VARIABLES[cat("dotnet|", dotnetVersion, "|aggregate-checksums")] ^
30+
set checksumsUrl to cat(checksumsBaseUrl, checksumsFilePath)
31+
}}^else:{{
32+
set checksumsUrl to cat(checksumsBaseUrl, ARGS["download-path"], ".sha512") ^
33+
set shaFileIsBare to "true"
34+
}}^
35+
36+
set checksumsFileParts to split(checksumsUrl, "/") ^
37+
set checksumsFileName to checksumsFileParts[len(checksumsFileParts) - 1]
2938

3039
}}{{if ARGS["use-local-version-var"]:{{ARGS['version-var']}} = '{{VARIABLES[cat("runtime|", dotnetVersion, "|build-version")]}}'; `
3140
}}{{dotnetFileVariable}} = \"{{dotnetFileName}}\"; `
41+
{{checksumFileVariable}} = \"{{checksumsFileName}}\"; `
3242
`
3343
{{InsertTemplate("Dockerfile.windows.download-file", [
3444
"out-file": dotnetFileVariable,
3545
"url": downloadUrl
3646
])}}; `
3747
{{InsertTemplate("Dockerfile.windows.download-file", [
38-
"out-file": checksumsFileName,
48+
"out-file": checksumFileVariable,
3949
"url": checksumsUrl
4050
])}}; `
4151
`
4252
{{InsertTemplate("Dockerfile.windows.validate-checksum", [
4353
"file": dotnetFileVariable,
44-
"sha-file": checksumsFileName,
45-
])}}
54+
"sha-file": checksumFileVariable,
55+
"sha-file-is-aggregate": useAggregateChecksums,
56+
"sha-file-is-bare": shaFileIsBare,
57+
"sha-function": "512"
58+
])}}; `
4659
`
4760
{{if (ARGS["mkdir"]):mkdir {{ARGS["mkdir"]}}; `
4861
}}{{InsertTemplate("Dockerfile.windows.extract-zip", [
4962
"file": dotnetFileVariable,
5063
"dest-dir": "dotnet",
5164
"extract-paths": ARGS["extract-paths"]
5265
])}}; `
53-
Remove-Item -Force {{dotnetFileVariable}}, {{checksumsFileName}}
66+
Remove-Item -Force {{dotnetFileVariable}}, {{checksumFileVariable}}

eng/dockerfile-templates/Dockerfile.windows.validate-checksum

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,29 @@
2323
`man sha512sum` for details.
2424
^
2525

26-
set shaValue to when(ARGS["sha-var-name"], ARGS["sha-var-name"], ARGS["sha"])
26+
set shaValue to
27+
when(ARGS["sha-file"] && ARGS["sha-file-is-bare"],
28+
cat("(Get-Content ", ARGS["sha-file"],")"),
29+
when(ARGS["sha-var-name"],
30+
ARGS["sha-var-name"],
31+
ARGS["sha"]))
2732

28-
}}{{if (ARGS["sha"]):{{if (ARGS["sha-var-name"]):{{ARGS["sha-var-name"]}} = '{{ARGS["sha"]}}'; `
33+
}}{{
34+
if (ARGS["sha"] || (ARGS["sha-file"] && ARGS["sha-file-is-bare"])):{{
35+
if (ARGS["sha-var-name"]):{{ARGS["sha-var-name"]}} = '{{ARGS["sha"]}}'; `
2936
}}if ((Get-FileHash {{ARGS["file"]}} -Algorithm sha{{ARGS["sha-function"]}}).Hash -ne {{shaValue}}) { `
3037
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
3138
exit 1; `
32-
}^else:$expectedHash = ( `
39+
}^else:$dotnetSha512 = ( `
3340
(Get-Content {{ARGS['sha-file']}} | Where-Object { `
3441
$_ -match \"$([regex]::Escape({{ARGS['file']}}))$\"; `
3542
}) -split '\s+' `
3643
)[0].ToUpper(); `
37-
$actualHash = (Get-FileHash {{ARGS['file']}} -Algorithm SHA512).Hash.ToUpper(); `
44+
$actualHash = (Get-FileHash {{ARGS['file']}} -Algorithm SHA{{ARGS["sha-function"]}}).Hash.ToUpper(); `
3845
`
39-
if ($expectedHash -ne $actualHash) { `
46+
if ($dotnetSha512 -ne $actualHash) { `
4047
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
4148
Write-Host \"Expected: $expectedHash\"; `
4249
Write-Host \"Actual: $actualHash\"; `
4350
exit 1; `
44-
}; `}}
51+
}^_}}

src/aspnet/10.0/nanoserver-1809/amd64/Dockerfile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,19 @@ RUN powershell -Command " `
1111
$ProgressPreference = 'SilentlyContinue'; `
1212
`
1313
$dotnetFile = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip\"; `
14+
$dotnetSha512File = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512\"; `
1415
`
1516
Invoke-WebRequest -OutFile $dotnetFile https://ci.dot.net/public/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip; `
16-
Invoke-WebRequest -OutFile https://ci.dot.net/public-checksums; `
17+
Invoke-WebRequest -OutFile $dotnetSha512File https://ci.dot.net/public-checksums/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512; `
1718
`
18-
$expectedHash = ( `
19-
(Get-Content | Where-Object { `
20-
$_ -match \"$([regex]::Escape($dotnetFile))$\"; `
21-
}) -split '\s+' `
22-
)[0].ToUpper(); `
23-
$actualHash = (Get-FileHash $dotnetFile -Algorithm SHA512).Hash.ToUpper(); `
24-
`
25-
if ($expectedHash -ne $actualHash) { `
19+
if ((Get-FileHash $dotnetFile -Algorithm sha512).Hash -ne (Get-Content $dotnetSha512File)) { `
2620
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
27-
Write-Host \"Expected: $expectedHash\"; `
28-
Write-Host \"Actual: $actualHash\"; `
2921
exit 1; `
3022
}; `
3123
`
3224
mkdir dotnet/shared/Microsoft.AspNetCore.App; `
3325
tar --gzip --extract --no-same-owner --file $dotnetFile --directory dotnet ./shared/Microsoft.AspNetCore.App; `
34-
Remove-Item -Force $dotnetFile, "
26+
Remove-Item -Force $dotnetFile, $dotnetSha512File"
3527

3628

3729
# ASP.NET Core image

src/aspnet/10.0/nanoserver-ltsc2022/amd64/Dockerfile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,19 @@ RUN powershell -Command " `
1111
$ProgressPreference = 'SilentlyContinue'; `
1212
`
1313
$dotnetFile = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip\"; `
14+
$dotnetSha512File = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512\"; `
1415
`
1516
Invoke-WebRequest -OutFile $dotnetFile https://ci.dot.net/public/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip; `
16-
Invoke-WebRequest -OutFile https://ci.dot.net/public-checksums; `
17+
Invoke-WebRequest -OutFile $dotnetSha512File https://ci.dot.net/public-checksums/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512; `
1718
`
18-
$expectedHash = ( `
19-
(Get-Content | Where-Object { `
20-
$_ -match \"$([regex]::Escape($dotnetFile))$\"; `
21-
}) -split '\s+' `
22-
)[0].ToUpper(); `
23-
$actualHash = (Get-FileHash $dotnetFile -Algorithm SHA512).Hash.ToUpper(); `
24-
`
25-
if ($expectedHash -ne $actualHash) { `
19+
if ((Get-FileHash $dotnetFile -Algorithm sha512).Hash -ne (Get-Content $dotnetSha512File)) { `
2620
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
27-
Write-Host \"Expected: $expectedHash\"; `
28-
Write-Host \"Actual: $actualHash\"; `
2921
exit 1; `
3022
}; `
3123
`
3224
mkdir dotnet/shared/Microsoft.AspNetCore.App; `
3325
tar --gzip --extract --no-same-owner --file $dotnetFile --directory dotnet ./shared/Microsoft.AspNetCore.App; `
34-
Remove-Item -Force $dotnetFile, "
26+
Remove-Item -Force $dotnetFile, $dotnetSha512File"
3527

3628

3729
# ASP.NET Core image

src/aspnet/10.0/nanoserver-ltsc2025/amd64/Dockerfile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,19 @@ RUN powershell -Command " `
1111
$ProgressPreference = 'SilentlyContinue'; `
1212
`
1313
$dotnetFile = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip\"; `
14+
$dotnetSha512File = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512\"; `
1415
`
1516
Invoke-WebRequest -OutFile $dotnetFile https://ci.dot.net/public/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip; `
16-
Invoke-WebRequest -OutFile https://ci.dot.net/public-checksums; `
17+
Invoke-WebRequest -OutFile $dotnetSha512File https://ci.dot.net/public-checksums/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512; `
1718
`
18-
$expectedHash = ( `
19-
(Get-Content | Where-Object { `
20-
$_ -match \"$([regex]::Escape($dotnetFile))$\"; `
21-
}) -split '\s+' `
22-
)[0].ToUpper(); `
23-
$actualHash = (Get-FileHash $dotnetFile -Algorithm SHA512).Hash.ToUpper(); `
24-
`
25-
if ($expectedHash -ne $actualHash) { `
19+
if ((Get-FileHash $dotnetFile -Algorithm sha512).Hash -ne (Get-Content $dotnetSha512File)) { `
2620
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
27-
Write-Host \"Expected: $expectedHash\"; `
28-
Write-Host \"Actual: $actualHash\"; `
2921
exit 1; `
3022
}; `
3123
`
3224
mkdir dotnet/shared/Microsoft.AspNetCore.App; `
3325
tar --gzip --extract --no-same-owner --file $dotnetFile --directory dotnet ./shared/Microsoft.AspNetCore.App; `
34-
Remove-Item -Force $dotnetFile, "
26+
Remove-Item -Force $dotnetFile, $dotnetSha512File"
3527

3628

3729
# ASP.NET Core image

src/aspnet/10.0/windowsservercore-ltsc2019/amd64/Dockerfile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,19 @@ RUN powershell -Command " `
1111
$ProgressPreference = 'SilentlyContinue'; `
1212
`
1313
$dotnetFile = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip\"; `
14+
$dotnetSha512File = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512\"; `
1415
`
1516
Invoke-WebRequest -OutFile $dotnetFile https://ci.dot.net/public/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip; `
16-
Invoke-WebRequest -OutFile https://ci.dot.net/public-checksums; `
17+
Invoke-WebRequest -OutFile $dotnetSha512File https://ci.dot.net/public-checksums/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512; `
1718
`
18-
$expectedHash = ( `
19-
(Get-Content | Where-Object { `
20-
$_ -match \"$([regex]::Escape($dotnetFile))$\"; `
21-
}) -split '\s+' `
22-
)[0].ToUpper(); `
23-
$actualHash = (Get-FileHash $dotnetFile -Algorithm SHA512).Hash.ToUpper(); `
24-
`
25-
if ($expectedHash -ne $actualHash) { `
19+
if ((Get-FileHash $dotnetFile -Algorithm sha512).Hash -ne (Get-Content $dotnetSha512File)) { `
2620
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
27-
Write-Host \"Expected: $expectedHash\"; `
28-
Write-Host \"Actual: $actualHash\"; `
2921
exit 1; `
3022
}; `
3123
`
3224
mkdir dotnet/shared/Microsoft.AspNetCore.App; `
3325
tar --gzip --extract --no-same-owner --file $dotnetFile --directory dotnet ./shared/Microsoft.AspNetCore.App; `
34-
Remove-Item -Force $dotnetFile, "
26+
Remove-Item -Force $dotnetFile, $dotnetSha512File"
3527

3628

3729
# ASP.NET Core image

src/aspnet/10.0/windowsservercore-ltsc2022/amd64/Dockerfile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,19 @@ RUN powershell -Command " `
1111
$ProgressPreference = 'SilentlyContinue'; `
1212
`
1313
$dotnetFile = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip\"; `
14+
$dotnetSha512File = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512\"; `
1415
`
1516
Invoke-WebRequest -OutFile $dotnetFile https://ci.dot.net/public/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip; `
16-
Invoke-WebRequest -OutFile https://ci.dot.net/public-checksums; `
17+
Invoke-WebRequest -OutFile $dotnetSha512File https://ci.dot.net/public-checksums/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512; `
1718
`
18-
$expectedHash = ( `
19-
(Get-Content | Where-Object { `
20-
$_ -match \"$([regex]::Escape($dotnetFile))$\"; `
21-
}) -split '\s+' `
22-
)[0].ToUpper(); `
23-
$actualHash = (Get-FileHash $dotnetFile -Algorithm SHA512).Hash.ToUpper(); `
24-
`
25-
if ($expectedHash -ne $actualHash) { `
19+
if ((Get-FileHash $dotnetFile -Algorithm sha512).Hash -ne (Get-Content $dotnetSha512File)) { `
2620
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
27-
Write-Host \"Expected: $expectedHash\"; `
28-
Write-Host \"Actual: $actualHash\"; `
2921
exit 1; `
3022
}; `
3123
`
3224
mkdir dotnet/shared/Microsoft.AspNetCore.App; `
3325
tar --gzip --extract --no-same-owner --file $dotnetFile --directory dotnet ./shared/Microsoft.AspNetCore.App; `
34-
Remove-Item -Force $dotnetFile, "
26+
Remove-Item -Force $dotnetFile, $dotnetSha512File"
3527

3628

3729
# ASP.NET Core image

src/aspnet/10.0/windowsservercore-ltsc2025/amd64/Dockerfile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,19 @@ RUN powershell -Command " `
1111
$ProgressPreference = 'SilentlyContinue'; `
1212
`
1313
$dotnetFile = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip\"; `
14+
$dotnetSha512File = \"aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512\"; `
1415
`
1516
Invoke-WebRequest -OutFile $dotnetFile https://ci.dot.net/public/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip; `
16-
Invoke-WebRequest -OutFile https://ci.dot.net/public-checksums; `
17+
Invoke-WebRequest -OutFile $dotnetSha512File https://ci.dot.net/public-checksums/aspnetcore/Runtime/10.0.0-preview.6.25326.107/aspnetcore-runtime-10.0.0-preview.6.25326.107-win-x64.zip.sha512; `
1718
`
18-
$expectedHash = ( `
19-
(Get-Content | Where-Object { `
20-
$_ -match \"$([regex]::Escape($dotnetFile))$\"; `
21-
}) -split '\s+' `
22-
)[0].ToUpper(); `
23-
$actualHash = (Get-FileHash $dotnetFile -Algorithm SHA512).Hash.ToUpper(); `
24-
`
25-
if ($expectedHash -ne $actualHash) { `
19+
if ((Get-FileHash $dotnetFile -Algorithm sha512).Hash -ne (Get-Content $dotnetSha512File)) { `
2620
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
27-
Write-Host \"Expected: $expectedHash\"; `
28-
Write-Host \"Actual: $actualHash\"; `
2921
exit 1; `
3022
}; `
3123
`
3224
mkdir dotnet/shared/Microsoft.AspNetCore.App; `
3325
tar --gzip --extract --no-same-owner --file $dotnetFile --directory dotnet ./shared/Microsoft.AspNetCore.App; `
34-
Remove-Item -Force $dotnetFile, "
26+
Remove-Item -Force $dotnetFile, $dotnetSha512File"
3527

3628

3729
# ASP.NET Core image

src/aspnet/8.0/nanoserver-1809/amd64/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ RUN powershell -Command " `
1111
$ProgressPreference = 'SilentlyContinue'; `
1212
`
1313
$dotnetFile = \"aspnetcore-runtime-8.0.17-win-x64.zip\"; `
14+
$dotnetChecksumsFile = \"8.0.17-sha.txt\"; `
1415
`
1516
Invoke-WebRequest -OutFile $dotnetFile https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/8.0.17/aspnetcore-runtime-8.0.17-win-x64.zip; `
16-
Invoke-WebRequest -OutFile 8.0.17-sha.txt https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.17-sha.txt; `
17+
Invoke-WebRequest -OutFile $dotnetChecksumsFile https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.17-sha.txt; `
1718
`
18-
$expectedHash = ( `
19-
(Get-Content 8.0.17-sha.txt | Where-Object { `
19+
$dotnetSha512 = ( `
20+
(Get-Content $dotnetChecksumsFile | Where-Object { `
2021
$_ -match \"$([regex]::Escape($dotnetFile))$\"; `
2122
}) -split '\s+' `
2223
)[0].ToUpper(); `
2324
$actualHash = (Get-FileHash $dotnetFile -Algorithm SHA512).Hash.ToUpper(); `
2425
`
25-
if ($expectedHash -ne $actualHash) { `
26+
if ($dotnetSha512 -ne $actualHash) { `
2627
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
2728
Write-Host \"Expected: $expectedHash\"; `
2829
Write-Host \"Actual: $actualHash\"; `
@@ -31,7 +32,7 @@ RUN powershell -Command " `
3132
`
3233
mkdir dotnet/shared/Microsoft.AspNetCore.App; `
3334
tar --gzip --extract --no-same-owner --file $dotnetFile --directory dotnet ./shared/Microsoft.AspNetCore.App; `
34-
Remove-Item -Force $dotnetFile, 8.0.17-sha.txt"
35+
Remove-Item -Force $dotnetFile, $dotnetChecksumsFile"
3536

3637

3738
# ASP.NET Core image

src/aspnet/8.0/nanoserver-ltsc2022/amd64/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ RUN powershell -Command " `
1111
$ProgressPreference = 'SilentlyContinue'; `
1212
`
1313
$dotnetFile = \"aspnetcore-runtime-8.0.17-win-x64.zip\"; `
14+
$dotnetChecksumsFile = \"8.0.17-sha.txt\"; `
1415
`
1516
Invoke-WebRequest -OutFile $dotnetFile https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/8.0.17/aspnetcore-runtime-8.0.17-win-x64.zip; `
16-
Invoke-WebRequest -OutFile 8.0.17-sha.txt https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.17-sha.txt; `
17+
Invoke-WebRequest -OutFile $dotnetChecksumsFile https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.17-sha.txt; `
1718
`
18-
$expectedHash = ( `
19-
(Get-Content 8.0.17-sha.txt | Where-Object { `
19+
$dotnetSha512 = ( `
20+
(Get-Content $dotnetChecksumsFile | Where-Object { `
2021
$_ -match \"$([regex]::Escape($dotnetFile))$\"; `
2122
}) -split '\s+' `
2223
)[0].ToUpper(); `
2324
$actualHash = (Get-FileHash $dotnetFile -Algorithm SHA512).Hash.ToUpper(); `
2425
`
25-
if ($expectedHash -ne $actualHash) { `
26+
if ($dotnetSha512 -ne $actualHash) { `
2627
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
2728
Write-Host \"Expected: $expectedHash\"; `
2829
Write-Host \"Actual: $actualHash\"; `
@@ -31,7 +32,7 @@ RUN powershell -Command " `
3132
`
3233
mkdir dotnet/shared/Microsoft.AspNetCore.App; `
3334
tar --gzip --extract --no-same-owner --file $dotnetFile --directory dotnet ./shared/Microsoft.AspNetCore.App; `
34-
Remove-Item -Force $dotnetFile, 8.0.17-sha.txt"
35+
Remove-Item -Force $dotnetFile, $dotnetChecksumsFile"
3536

3637

3738
# ASP.NET Core image

0 commit comments

Comments
 (0)