diff --git a/images/macos/software-report/SoftwareReport.Common.psm1 b/images/macos/software-report/SoftwareReport.Common.psm1 index 3aff25aff..7f141687a 100644 --- a/images/macos/software-report/SoftwareReport.Common.psm1 +++ b/images/macos/software-report/SoftwareReport.Common.psm1 @@ -459,6 +459,11 @@ function Get-StackVersion { return "Stack $stackVersion" } +function Get-SwiftFormatVersion { + $swiftFormatVersion = Run-Command "swiftformat --version" + return "SwiftFormat $swiftFormatVersion" +} + function Get-YamllintVersion { $yamllintVersion = Run-Command "yamllint --version" return $yamllintVersion diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index 48130392d..a1c77fe9e 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -164,7 +164,8 @@ if( -not $os.IsHighSierra) { (Get-GHCupVersion), (Get-GHCVersion), (Get-CabalVersion), - (Get-StackVersion) + (Get-StackVersion), + (Get-SwiftFormatVersion) ) } diff --git a/images/macos/tests/BasicTools.Tests.ps1 b/images/macos/tests/BasicTools.Tests.ps1 index 01ff9def6..db36dbfdd 100644 --- a/images/macos/tests/BasicTools.Tests.ps1 +++ b/images/macos/tests/BasicTools.Tests.ps1 @@ -18,6 +18,12 @@ Describe "Subversion" { } } +Describe "SwiftFormat" { + It "SwiftFormat" { + "swiftformat --version" | Should -ReturnZeroExitCode + } +} + Describe "Go" { It "Go" { "go version" | Should -ReturnZeroExitCode diff --git a/images/macos/toolsets/toolset-10.14.json b/images/macos/toolsets/toolset-10.14.json index 31963316b..55618dd9d 100644 --- a/images/macos/toolsets/toolset-10.14.json +++ b/images/macos/toolsets/toolset-10.14.json @@ -251,6 +251,7 @@ "parallel", "perl", "subversion", + "swiftformat", "xctool", "zstd" ], diff --git a/images/macos/toolsets/toolset-10.15.json b/images/macos/toolsets/toolset-10.15.json index 94fe683cd..c59206c84 100644 --- a/images/macos/toolsets/toolset-10.15.json +++ b/images/macos/toolsets/toolset-10.15.json @@ -203,6 +203,7 @@ "parallel", "perl", "subversion", + "swiftformat", "xctool", "zstd" ], diff --git a/images/macos/toolsets/toolset-11.0.json b/images/macos/toolsets/toolset-11.0.json index e7cb51932..ea557e8b0 100644 --- a/images/macos/toolsets/toolset-11.0.json +++ b/images/macos/toolsets/toolset-11.0.json @@ -135,6 +135,7 @@ "packer", "perl", "subversion", + "swiftformat", "zstd" ], "cask_packages": [