From 6f437059cb126ce3c0a9bd24e2f7c4ef0562cbbd Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Fri, 8 Nov 2024 11:44:51 +1100 Subject: [PATCH] Change CRLF to LF --- Evergreen/Apps/Get-mySQLConnectorNET.ps1 | 90 ++++++++++----------- Evergreen/Apps/Get-mySQLConnectorODBC.ps1 | 88 ++++++++++---------- Evergreen/Manifests/mySQLConnectorNET.json | 56 ++++++------- Evergreen/Manifests/mySQLConnectorODBC.json | 58 ++++++------- 4 files changed, 146 insertions(+), 146 deletions(-) diff --git a/Evergreen/Apps/Get-mySQLConnectorNET.ps1 b/Evergreen/Apps/Get-mySQLConnectorNET.ps1 index 5c3f2c2a..a441998a 100644 --- a/Evergreen/Apps/Get-mySQLConnectorNET.ps1 +++ b/Evergreen/Apps/Get-mySQLConnectorNET.ps1 @@ -1,45 +1,45 @@ -function Get-mySQLConnectorNET { - <# - .NOTES - Author: BornToBeRoot - Twitter: @BornToBeRoot - #> - [OutputType([System.Management.Automation.PSObject])] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification = "Product name is a plural")] - [CmdletBinding(SupportsShouldProcess = $False)] - param ( - [Parameter(Mandatory = $False, Position = 0)] - [ValidateNotNull()] - [System.Management.Automation.PSObject] - $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) - ) - - # Get latest repo tag - $Tags = Get-GitHubRepoTag -Uri $res.Get.Update.Uri - - $Version = ($Tags | Sort-Object -Property @{ Expression = { [System.Version]$_.Tag }; Descending = $true } | Select-Object -First 1).Tag - - # Build the output object - if ($Null -ne $Version) { - foreach ($Architecture in $res.Get.Download.Uri.GetEnumerator()) { - - # https://dev.mysql.com/get/Downloads/Connector-ODBC/9.1/mysql-connector-odbc-9.1.0-winx64.msi - # redirect to - # https://cdn.mysql.com//Downloads/Connector-ODBC/9.1/mysql-connector-odbc-9.1.0-winx64.msi - # - # The sub path is only major.minor - # 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] - - $PSObject = [PSCustomObject] @{ - Version = $Version - Type = Get-FileType -File $Uri - Architecture = $Architecture.Name - URI = $CdnUri - } - Write-Output -InputObject $PSObject - } - } -} +function Get-mySQLConnectorNET { + <# + .NOTES + Author: BornToBeRoot + Twitter: @BornToBeRoot + #> + [OutputType([System.Management.Automation.PSObject])] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification = "Product name is a plural")] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get latest repo tag + $Tags = Get-GitHubRepoTag -Uri $res.Get.Update.Uri + + $Version = ($Tags | Sort-Object -Property @{ Expression = { [System.Version]$_.Tag }; Descending = $true } | Select-Object -First 1).Tag + + # Build the output object + if ($Null -ne $Version) { + foreach ($Architecture in $res.Get.Download.Uri.GetEnumerator()) { + + # https://dev.mysql.com/get/Downloads/Connector-ODBC/9.1/mysql-connector-odbc-9.1.0-winx64.msi + # redirect to + # https://cdn.mysql.com//Downloads/Connector-ODBC/9.1/mysql-connector-odbc-9.1.0-winx64.msi + # + # The sub path is only major.minor + # 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] + + $PSObject = [PSCustomObject] @{ + Version = $Version + Type = Get-FileType -File $Uri + Architecture = $Architecture.Name + URI = $CdnUri + } + Write-Output -InputObject $PSObject + } + } +} diff --git a/Evergreen/Apps/Get-mySQLConnectorODBC.ps1 b/Evergreen/Apps/Get-mySQLConnectorODBC.ps1 index b57c9248..6dee93ec 100644 --- a/Evergreen/Apps/Get-mySQLConnectorODBC.ps1 +++ b/Evergreen/Apps/Get-mySQLConnectorODBC.ps1 @@ -1,44 +1,44 @@ -function Get-mySQLConnectorODBC { - <# - .NOTES - Author: BornToBeRoot - Twitter: @BornToBeRoot - #> - [OutputType([System.Management.Automation.PSObject])] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification = "Product name is a plural")] - [CmdletBinding(SupportsShouldProcess = $False)] - param ( - [Parameter(Mandatory = $False, Position = 0)] - [ValidateNotNull()] - [System.Management.Automation.PSObject] - $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) - ) - - # Get latest repo tag - $Tags = Get-GitHubRepoTag -Uri $res.Get.Update.Uri - - $Version = ($Tags | Sort-Object -Property @{ Expression = { [System.Version]$_.Tag }; Descending = $true } | Select-Object -First 1).Tag - - # Build the output object - if ($Null -ne $Version) { - foreach ($Architecture in $res.Get.Download.Uri.GetEnumerator()) { - - # https://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-9.1.0.msi - # redirect to - # https://cdn.mysql.com//Downloads/Connector-Net/mysql-connector-net-9.1.0.msi - # - # 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] - - $PSObject = [PSCustomObject] @{ - Version = $Version - Type = Get-FileType -File $Uri - Architecture = $Architecture.Name - URI = $CdnUri - } - Write-Output -InputObject $PSObject - } - } -} +function Get-mySQLConnectorODBC { + <# + .NOTES + Author: BornToBeRoot + Twitter: @BornToBeRoot + #> + [OutputType([System.Management.Automation.PSObject])] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification = "Product name is a plural")] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get latest repo tag + $Tags = Get-GitHubRepoTag -Uri $res.Get.Update.Uri + + $Version = ($Tags | Sort-Object -Property @{ Expression = { [System.Version]$_.Tag }; Descending = $true } | Select-Object -First 1).Tag + + # Build the output object + if ($Null -ne $Version) { + foreach ($Architecture in $res.Get.Download.Uri.GetEnumerator()) { + + # https://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-9.1.0.msi + # redirect to + # https://cdn.mysql.com//Downloads/Connector-Net/mysql-connector-net-9.1.0.msi + # + # 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] + + $PSObject = [PSCustomObject] @{ + Version = $Version + Type = Get-FileType -File $Uri + Architecture = $Architecture.Name + URI = $CdnUri + } + Write-Output -InputObject $PSObject + } + } +} diff --git a/Evergreen/Manifests/mySQLConnectorNET.json b/Evergreen/Manifests/mySQLConnectorNET.json index 6b5b680b..5159d25d 100644 --- a/Evergreen/Manifests/mySQLConnectorNET.json +++ b/Evergreen/Manifests/mySQLConnectorNET.json @@ -1,29 +1,29 @@ -{ - "Name": "mySQL Connector NET", - "Source": "https://dev.mysql.com/doc/connector-net/en/", - "Get": { - "Update": { - "Uri": "https://api.github.com/repos/mysql/mysql-connector-net/tags" - }, - "Download": { - "Uri": { - "x64": "https://dev.mysql.com/get/Downloads/Connector-ODBC/#versionshort/mysql-connector-odbc-#version-winx64.msi" - }, - "ReplaceVersion": "#version", - "ReplaceVersionShort": "#versionshort" - } - }, - "Install": { - "Setup": "", - "Preinstall": "", - "Physical": { - "Arguments": "", - "PostInstall": [] - }, - "Virtual": { - "Arguments": "", - "PostInstall": [] - } - } - } +{ + "Name": "mySQL Connector NET", + "Source": "https://dev.mysql.com/doc/connector-net/en/", + "Get": { + "Update": { + "Uri": "https://api.github.com/repos/mysql/mysql-connector-net/tags" + }, + "Download": { + "Uri": { + "x64": "https://dev.mysql.com/get/Downloads/Connector-ODBC/#versionshort/mysql-connector-odbc-#version-winx64.msi" + }, + "ReplaceVersion": "#version", + "ReplaceVersionShort": "#versionshort" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } + } \ No newline at end of file diff --git a/Evergreen/Manifests/mySQLConnectorODBC.json b/Evergreen/Manifests/mySQLConnectorODBC.json index e22c0718..b961898a 100644 --- a/Evergreen/Manifests/mySQLConnectorODBC.json +++ b/Evergreen/Manifests/mySQLConnectorODBC.json @@ -1,29 +1,29 @@ -{ - "Name": "mySQL Connector ODCB", - "Source": "https://dev.mysql.com/doc/connector-odbc/en/", - "Get": { - "Update": { - "Uri": "https://api.github.com/repos/mysql/mysql-connector-odbc/tags" - }, - "Download": { - "Uri": { - "x64": "https://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-#version.msi" - }, - "ReplaceVersion": "#version" - } - }, - "Install": { - "Setup": "", - "Preinstall": "", - "Physical": { - "Arguments": "", - "PostInstall": [ - ] - }, - "Virtual": { - "Arguments": "", - "PostInstall": [ - ] - } - } -} +{ + "Name": "mySQL Connector ODCB", + "Source": "https://dev.mysql.com/doc/connector-odbc/en/", + "Get": { + "Update": { + "Uri": "https://api.github.com/repos/mysql/mysql-connector-odbc/tags" + }, + "Download": { + "Uri": { + "x64": "https://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-#version.msi" + }, + "ReplaceVersion": "#version" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "", + "PostInstall": [ + ] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [ + ] + } + } +}