diff --git a/images/win/scripts/Installers/Install-Swig.ps1 b/images/win/scripts/Installers/Install-Swig.ps1 new file mode 100644 index 000000000..92cdd576a --- /dev/null +++ b/images/win/scripts/Installers/Install-Swig.ps1 @@ -0,0 +1,8 @@ +################################################################################ +## File: Install-Swig.ps1 +## Desc: Install Swig +################################################################################ + +Choco-Install -PackageName swig + +Invoke-PesterTests -TestFile "Tools" -TestName "Swig" diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index ab477545d..2c14ee9bc 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -101,6 +101,7 @@ $markdown += New-MDList -Style Unordered -Lines (@( (Get-StackVersion), (Get-SVNVersion), (Get-VSWhereVersion), + (Get-SwigVersion), (Get-WinAppDriver), (Get-ZstdVersion), (Get-YAMLLintVersion) diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index e8890b8ad..eddd3de97 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -257,4 +257,10 @@ function Get-DacFxVersion { cd "C:\Program Files\Microsoft SQL Server\150\DAC\bin\" $dacfxversion = (./sqlpackage.exe /version) return "DacFx $dacfxversion" -} \ No newline at end of file +} + +function Get-SwigVersion { + (swig -version | Out-String) -match "version (?\d+\.\d+\.\d+)" | Out-Null + $swigVersion = $Matches.Version + return "Swig $swigVersion" +} diff --git a/images/win/scripts/Tests/Tools.Tests.ps1 b/images/win/scripts/Tests/Tools.Tests.ps1 index 4b446cd4d..db110f5f2 100644 --- a/images/win/scripts/Tests/Tools.Tests.ps1 +++ b/images/win/scripts/Tests/Tools.Tests.ps1 @@ -258,3 +258,9 @@ Describe "Pipx" { "pipx --version" | Should -ReturnZeroExitCode } } + +Describe "Swig" { + It "Swig" { + "swig -version" | Should -ReturnZeroExitCode + } +} diff --git a/images/win/windows2016.json b/images/win/windows2016.json index d8c427e88..4c183f6ee 100644 --- a/images/win/windows2016.json +++ b/images/win/windows2016.json @@ -253,7 +253,8 @@ "{{ template_dir }}/scripts/Installers/Install-Selenium.ps1", "{{ template_dir }}/scripts/Installers/Install-IEWebDriver.ps1", "{{ template_dir }}/scripts/Installers/Install-Apache.ps1", - "{{ template_dir }}/scripts/Installers/Install-Nginx.ps1" + "{{ template_dir }}/scripts/Installers/Install-Nginx.ps1", + "{{ template_dir }}/scripts/Installers/Install-Swig.ps1" ] }, { diff --git a/images/win/windows2019.json b/images/win/windows2019.json index d10119b94..8bb66f535 100644 --- a/images/win/windows2019.json +++ b/images/win/windows2019.json @@ -257,7 +257,8 @@ "{{ template_dir }}/scripts/Installers/Install-Selenium.ps1", "{{ template_dir }}/scripts/Installers/Install-IEWebDriver.ps1", "{{ template_dir }}/scripts/Installers/Install-Apache.ps1", - "{{ template_dir }}/scripts/Installers/Install-Nginx.ps1" + "{{ template_dir }}/scripts/Installers/Install-Nginx.ps1", + "{{ template_dir }}/scripts/Installers/Install-Swig.ps1" ] }, {