From 4b9ba35173b87de7a3fbd6545c8a85ddda044a37 Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Wed, 8 Nov 2023 06:36:34 +0800 Subject: [PATCH] chore: fix the hash for setup scripts (#3009) * chore: fix the hash for setup scripts * chore: fix the hash in the getting started guide --- docs/GettingStarted.md | 2 +- scripts/Setup-DevEnv.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index 90018c1294..081539aaf0 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -58,7 +58,7 @@ Alternative install steps (for *basic* Visual Studio Community edition): ```ps Invoke-WebRequest 'https://raw.githubusercontent.com/microsoft/ebpf-for-windows/main/scripts/Setup-DevEnv.ps1' -OutFile $env:TEMP\Setup-DeveEnv.ps1 - if ((get-filehash -Algorithm SHA256 $env:TEMP\Setup-DeveEnv.ps1).Hash -eq '9B9C4358B05DBD16EF58C0548B1ADBA4B5591FE14DFD3239FC580BB95B39988C') { &"$env:TEMP\Setup-DeveEnv.ps1" } + if ((get-filehash -Algorithm SHA256 $env:TEMP\Setup-DeveEnv.ps1).Hash -eq '0E8733AC82CFDEC93A3606AEA586A6BD08980D2301754EC165230FBA353E7B4C') { &"$env:TEMP\Setup-DeveEnv.ps1" } ``` >**Note**: the WDK for Windows 11 is [not currently available on Chocolatey](https://community.chocolatey.org/packages?q=windowsdriverkit), please install manually with the link in the [Prerequisites](#prerequisites) section above. diff --git a/scripts/Setup-DevEnv.ps1 b/scripts/Setup-DevEnv.ps1 index 583ea48a2c..10e9eaebde 100644 --- a/scripts/Setup-DevEnv.ps1 +++ b/scripts/Setup-DevEnv.ps1 @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT Invoke-WebRequest 'https://community.chocolatey.org/install.ps1' -OutFile $env:TEMP\install_choco.ps1 -if ((get-filehash -Algorithm SHA256 $env:TEMP\install_choco.ps1).Hash -ne '45014AC94BAAA135449D73DA9F4760ACDAE4C8943FA9998A47B74D0BBA8A5295') { throw "Wrong file hash for Chocolatey installer"} +if ((get-filehash -Algorithm SHA256 $env:TEMP\install_choco.ps1).Hash -ne 'B2980C92C1E3EFB45E3EFA428E2EF26EAC846F8B2606DA0D2B1342AC26D36B97') { throw "Wrong file hash for Chocolatey installer"} &"$env:TEMP\install_choco.ps1" choco install git --version 2.38.1 -y choco install visualstudio2022community --version 117.4.2.0 -y