From 9247e2cbf29d23562f1cb7527145cf7b02d1ca91 Mon Sep 17 00:00:00 2001 From: Francisco Gamino Date: Thu, 19 May 2022 11:18:02 -0700 Subject: [PATCH] Remove downloading 'Utility.psd1' and 'Management.psd1' from build (#811) --- build.ps1 | 6 ------ tools/helper.psm1 | 13 ------------- 2 files changed, 19 deletions(-) diff --git a/build.ps1 b/build.ps1 index f00c69bc..60d1a8fb 100644 --- a/build.ps1 +++ b/build.ps1 @@ -168,12 +168,6 @@ if (!$NoBuild.IsPresent) { Get-Item "$PSScriptRoot/src/Modules/PackageManagement/1.1.7.0/fullclr" -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue - # TODO: Remove this once the SDK properly bundles modules - Get-WebFile -Url 'https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Modules/Windows/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1' ` - -OutFile "$PSScriptRoot/src/Modules/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1" - Get-WebFile -Url 'https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Modules/Windows/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1' ` - -OutFile "$PSScriptRoot/src/Modules/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1" - dotnet publish -c $Configuration "/p:BuildNumber=$BuildNumber" $PSScriptRoot if ($AddSBOM) diff --git a/tools/helper.psm1 b/tools/helper.psm1 index e52a62b8..cd16e452 100644 --- a/tools/helper.psm1 +++ b/tools/helper.psm1 @@ -173,19 +173,6 @@ function Resolve-ProtoBufToolPath } } -function Get-WebFile { - param ( - [string] $Url, - [string] $OutFile - ) - $directoryName = [System.IO.Path]::GetDirectoryName($OutFile) - if (!(Test-Path $directoryName)) { - New-Item -Type Directory $directoryName - } - Remove-Item $OutFile -ErrorAction SilentlyContinue - Invoke-RestMethod $Url -OutFile $OutFile -} - function Write-Log { param(