diff --git a/Evergreen/Apps/Get-FileZilla.ps1 b/Evergreen/Apps/Get-FileZilla.ps1 index b12415fc..c1cea1b2 100644 --- a/Evergreen/Apps/Get-FileZilla.ps1 +++ b/Evergreen/Apps/Get-FileZilla.ps1 @@ -1,4 +1,4 @@ -Function Get-FileZilla { +function Get-FileZilla { <# .SYNOPSIS Get the current version and download URI for FileZilla for Windows. @@ -19,10 +19,10 @@ Function Get-FileZilla { # Query the update feed $params = @{ - Uri = $res.Get.Update.Uri - UserAgent = $res.Get.Update.UserAgent - SkipCertificateCheck = $True - Raw = $True + Uri = $res.Get.Update.Uri + UserAgent = $res.Get.Update.UserAgent + SkipCertificateCheck = $true + Raw = $true } $Content = Invoke-EvergreenWebRequest @params @@ -32,12 +32,11 @@ Function Get-FileZilla { Where-Object { $_.Channel -eq $res.Get.Update.Channel } } catch [System.Exception] { - Write-Warning -Message "$($MyInvocation.MyCommand): failed to convert update feed." - Break + throw $_ } # Output the object to the pipeline - ForEach ($Update in $Updates) { + foreach ($Update in $Updates) { $PSObject = [PSCustomObject] @{ Version = $Update.Version Size = $Update.Size diff --git a/Evergreen/Apps/Get-MicrosoftSsms.ps1 b/Evergreen/Apps/Get-MicrosoftSsms.ps1 index d1621a22..8b76dc3a 100644 --- a/Evergreen/Apps/Get-MicrosoftSsms.ps1 +++ b/Evergreen/Apps/Get-MicrosoftSsms.ps1 @@ -1,4 +1,4 @@ -Function Get-MicrosoftSsms { +function Get-MicrosoftSsms { <# .SYNOPSIS Returns the latest SQL Server Management Studio @@ -9,9 +9,9 @@ Function Get-MicrosoftSsms { #> [OutputType([System.Management.Automation.PSObject])] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification="Product name is a plural")] - [CmdletBinding(SupportsShouldProcess = $False)] + [CmdletBinding(SupportsShouldProcess = $false)] param ( - [Parameter(Mandatory = $False, Position = 0)] + [Parameter(Mandatory = $false, Position = 0)] [ValidateNotNull()] [System.Management.Automation.PSObject] $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) @@ -26,17 +26,16 @@ Function Get-MicrosoftSsms { } $Content = Invoke-EvergreenRestMethod @params - If ($Null -ne $Content) { - ForEach ($entry in $Content.component) { - - ForEach ($language in $res.Get.Download.Language.GetEnumerator()) { + if ($null -ne $Content) { + foreach ($entry in $Content.component) { + foreach ($language in $res.Get.Download.Language.GetEnumerator()) { # Follow the download link which will return a 301 $Uri = $res.Get.Download.Uri -replace $res.Get.Download.ReplaceText, $res.Get.Download.Language[$language.key] $ResponseUri = Resolve-SystemNetWebRequest -Uri $Uri # Check returned URL. It should be a go.microsoft.com/fwlink/?linkid style link - If ($Null -ne $ResponseUri) { + if ($null -ne $ResponseUri) { # Construct the output; Return the custom object to the pipeline $PSObject = [PSCustomObject] @{ diff --git a/Evergreen/Manifests/FileZilla.json b/Evergreen/Manifests/FileZilla.json index 19da6001..26fccd3a 100644 --- a/Evergreen/Manifests/FileZilla.json +++ b/Evergreen/Manifests/FileZilla.json @@ -3,8 +3,8 @@ "Source": "https://filezilla-project.org/", "Get": { "Update": { - "Uri": "https://update.filezilla-project.org/update.php?initial=0&manual=1&osarch=64&osversion=10.0&package=1&platform=x86_64-w64-mingw32&updated=0&version=3.47.2.1", - "UserAgent": "FileZilla/3.47.2.1", + "Uri": "https://update.filezilla-project.org/update.php?osarch=64&platform=x86_64-w64-mingw32&version=3.56.1", + "UserAgent": "FileZilla/3.66.1", "Delimiter": " ", "Headers": [ "Channel",