diff --git a/Evergreen/Apps/Get-AWSSMP.ps1 b/Evergreen/Apps/Get-AWSSMP.ps1 new file mode 100644 index 00000000..2914522b --- /dev/null +++ b/Evergreen/Apps/Get-AWSSMP.ps1 @@ -0,0 +1,31 @@ +function Get-AWSSMP { + <# + .SYNOPSIS + Get the current versions and download URLs for AWS Session Manager Plugin + + .NOTES + Author: Kirill Trofimov + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest version of AWS Session Manager Plugin via the latest tag on the repository + $Tags = Get-GitHubRepoTag -Uri $res.Get.Update.Uri + + # Select the latest version + $Version = $Tags | Sort-Object -Property @{ Expression = { [System.Version]$_.Tag }; Descending = $true } | Select-Object -First 1 + + # Output the version and download URL + $PSObject = [PSCustomObject] @{ + Version = $Version.Tag + Type = "exe" + URI = $res.Get.Download.Uri -replace $res.Get.Download.ReplaceText, $Version.Tag + } + Write-Output -InputObject $PSObject +} diff --git a/Evergreen/Apps/Get-AutoIt.ps1 b/Evergreen/Apps/Get-AutoIt.ps1 new file mode 100644 index 00000000..6aab619e --- /dev/null +++ b/Evergreen/Apps/Get-AutoIt.ps1 @@ -0,0 +1,39 @@ +function Get-AutoIt { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the update feed + $params = @{ + Uri = $res.Get.Update.Uri + UserAgent = $res.Get.Update.UserAgent + } + $UpdateFeed = Invoke-EvergreenRestMethod @params + if ($null -ne $UpdateFeed) { + + # Convert the INI update feed to an object + $Updates = ConvertFrom-IniFile -InputObject $UpdateFeed + foreach ($Key in $Updates.Keys) { + + # Output the latest version + [PSCustomObject]@{ + Version = $Updates[$Key].version + Date = ConvertTo-DateTime -DateTime $Updates[$Key].filetime -Pattern "yyyyMMddHHmmss" + Channel = $(if ($Key -match "Beta$") { "Beta" } else { "Stable" }) + Size = $Updates[$Key].filesize + Type = Get-FileType -File $Updates[$Key].setup + URI = $Updates[$Key].setup + } | Write-Output + } + } +} diff --git a/Evergreen/Apps/Get-PaintDotNet.ps1 b/Evergreen/Apps/Get-PaintDotNet.ps1 index 434a0fe9..d20c9630 100644 --- a/Evergreen/Apps/Get-PaintDotNet.ps1 +++ b/Evergreen/Apps/Get-PaintDotNet.ps1 @@ -1,4 +1,4 @@ -Function Get-PaintDotNet { +function Get-PaintDotNet { <# .SYNOPSIS Get the current version and download URL for the Paint.NET tools. @@ -8,9 +8,9 @@ Function Get-PaintDotNet { Twitter: @cit_bronson #> [OutputType([System.Management.Automation.PSObject])] - [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]) @@ -18,13 +18,14 @@ Function Get-PaintDotNet { # Read the Paint.NET updates feed $Content = Invoke-EvergreenWebRequest -Uri $res.Get.Uri - If ($Null -ne $Content) { + if ($null -ne $Content) { # Convert the content from string data $Data = $Content | ConvertFrom-StringData + $Key = $Data.Keys | Where-Object { $_ -match $res.Get.UrlProperty } # Build the output object - ForEach ($url in ($Data.("$($Data.StableVersions)$($res.Get.UrlProperty)") -split $res.Get.UrlDelimiter)) { + foreach ($url in $Data.$Key) { $PSObject = [PSCustomObject] @{ Version = $Data.($res.Get.VersionProperty) URI = $url diff --git a/Evergreen/Apps/Get-ScooterBeyondCompare.ps1 b/Evergreen/Apps/Get-ScooterBeyondCompare.ps1 index 3e90ec73..c942878f 100644 --- a/Evergreen/Apps/Get-ScooterBeyondCompare.ps1 +++ b/Evergreen/Apps/Get-ScooterBeyondCompare.ps1 @@ -58,20 +58,6 @@ URI = if ($language.key -eq "en") { $Update.download } else { $Update.download -replace "BCompare-", "BCompare-$($language.key)-" } } Write-Output -InputObject $PSObject - - # Output the version and download URL for the MSI - if ($language.key -eq "en") { - foreach ($Msi in $res.Get.Download.Uri) { - $PSObject = [PSCustomObject] @{ - Version = $Version - Language = $res.Get.Update.Languages[$language.key] - Architecture = Get-Architecture -String $Msi - Type = Get-FileType -File $Msi - URI = $Msi -replace "#version", $Version - } - Write-Output -InputObject $PSObject - } - } } } } diff --git a/Evergreen/Apps/Get-mySQLConnectorNET.ps1 b/Evergreen/Apps/Get-mySQLConnectorNET.ps1 index a17d1617..a820377b 100644 --- a/Evergreen/Apps/Get-mySQLConnectorNET.ps1 +++ b/Evergreen/Apps/Get-mySQLConnectorNET.ps1 @@ -31,7 +31,8 @@ function Get-mySQLConnectorNET { # The version ist major.minor.patch, while the tag can have also have major.minor.patch.build $Uri = $res.Get.Download.Uri[$Architecture.Key] -replace $res.Get.Download.ReplaceVersionShort, (($Version -split '\.')[0, 1] -join '.') -replace $res.Get.Download.ReplaceVersion, (($Version -split '\.')[0..2] -join '.') - $CdnUri = (Invoke-WebRequest $Uri -MaximumRedirection 0 -SkipHttpErrorCheck -ErrorAction:SilentlyContinue).Headers.Location[0] + # The website/CDN checks the user agent, which means that the call from e.g. Azure Automation is only possible by overwriting it + $CdnUri = (Invoke-WebRequest $Uri -MaximumRedirection 0 -UserAgent "Curl/8" -SkipHttpErrorCheck -ErrorAction:SilentlyContinue).Headers.Location[0] $PSObject = [PSCustomObject] @{ Version = $Version diff --git a/Evergreen/Apps/Get-mySQLConnectorODBC.ps1 b/Evergreen/Apps/Get-mySQLConnectorODBC.ps1 index f9c0b57a..335d16d4 100644 --- a/Evergreen/Apps/Get-mySQLConnectorODBC.ps1 +++ b/Evergreen/Apps/Get-mySQLConnectorODBC.ps1 @@ -30,7 +30,8 @@ function Get-mySQLConnectorODBC { # The version ist major.minor.patch, while the tag can have also have major.minor.patch.build $Uri = $res.Get.Download.Uri[$Architecture.Key] -replace $res.Get.Download.ReplaceVersion, (($Version -split '\.')[0..2] -join '.') - $CdnUri = (Invoke-WebRequest $Uri -MaximumRedirection 0 -SkipHttpErrorCheck -ErrorAction:SilentlyContinue).Headers.Location[0] + # The website/CDN checks the user agent, which means that the call from e.g. Azure Automation is only possible by overwriting it + $CdnUri = (Invoke-WebRequest $Uri -MaximumRedirection 0 -UserAgent "Curl/8" -SkipHttpErrorCheck -ErrorAction:SilentlyContinue).Headers.Location[0] $PSObject = [PSCustomObject] @{ Version = $Version diff --git a/Evergreen/Apps/Get-mySQLWorkbench.ps1 b/Evergreen/Apps/Get-mySQLWorkbench.ps1 index 75df4532..28b94778 100644 --- a/Evergreen/Apps/Get-mySQLWorkbench.ps1 +++ b/Evergreen/Apps/Get-mySQLWorkbench.ps1 @@ -30,7 +30,8 @@ function Get-mySQLWorkbench { # The version ist major.minor.patch, while the tag can have also have major.minor.patch.build $Uri = $res.Get.Download.Uri[$Architecture.Key] -replace $res.Get.Download.ReplaceVersion, (($Version -split '\.')[0..2] -join '.') - $CdnUri = (Invoke-WebRequest $Uri -MaximumRedirection 0 -SkipHttpErrorCheck -ErrorAction:SilentlyContinue).Headers.Location[0] + # The website/CDN checks the user agent, which means that the call from e.g. Azure Automation is only possible by overwriting it + $CdnUri = (Invoke-WebRequest $Uri -MaximumRedirection 0 -UserAgent "Curl/8" -SkipHttpErrorCheck -ErrorAction:SilentlyContinue).Headers.Location[0] $PSObject = [PSCustomObject] @{ Version = $Version diff --git a/Evergreen/Manifests/AWSSMP.json b/Evergreen/Manifests/AWSSMP.json new file mode 100644 index 00000000..bdef7042 --- /dev/null +++ b/Evergreen/Manifests/AWSSMP.json @@ -0,0 +1,25 @@ +{ + "Name": "AWS Session Manager Plugin", + "Source": "https://github.com/aws/session-manager-plugin", + "Get": { + "Update": { + "Uri": "https://api.github.com/repos/aws/session-manager-plugin/tags", + "ContentType": "application/json; charset=utf-8" + }, + "Download": { + "Uri" :"https://s3.amazonaws.com/session-manager-downloads/plugin/#version/windows/SessionManagerPluginSetup.exe", + "ReplaceText": "#version" + } + }, + "Install": { + "Setup": "SessionManagerPluginSetup.exe", + "Physical": { + "Arguments": "/quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/AutoIt.json b/Evergreen/Manifests/AutoIt.json new file mode 100644 index 00000000..d65c9123 --- /dev/null +++ b/Evergreen/Manifests/AutoIt.json @@ -0,0 +1,25 @@ +{ + "Name": "AutoIt Scripting Language", + "Source": "https://www.autoitscript.com/site/autoit/", + "Get": { + "Update": { + "Uri": "https://www.autoitscript.com/autoit3/files/beta/update.dat", + "ContentType": "text/plain; charset=utf-8", + "UserAgent": "AutoIt" + }, + "Download": { + "Uri": "" + } + }, + "Install": { + "Setup": "", + "Physical": { + "Arguments": "", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/ScooterBeyondCompare.json b/Evergreen/Manifests/ScooterBeyondCompare.json index bdce141a..389de7f6 100644 --- a/Evergreen/Manifests/ScooterBeyondCompare.json +++ b/Evergreen/Manifests/ScooterBeyondCompare.json @@ -3,7 +3,7 @@ "Source": "https://scootersoftware.com/", "Get": { "Update": { - "Uri": "https://www.scootersoftware.com/checkupdates.php?product=bc4&minor=3&maint=2&auth=30.15&build=24472&edition=prodebug&cpuarch=x86_64&platform=win32&lang=silent", + "Uri": "https://www.scootersoftware.com/checkupdates.php?product=bc5&minor=3&maint=2&auth=30.15&build=24472&edition=prodebug&cpuarch=x86_64&platform=win32&lang=silent", "UserAgent": "BeyondCompare/4.3 (Windows NT 10.0; Win64; x64)", "XmlNode": "//Update", "MatchVersion": "(\\d+(\\.\\d+)(\\.\\d+))",