From f439d173c2b2da344a1e5900ff2df12155a842e4 Mon Sep 17 00:00:00 2001 From: Igor Boskovic Date: Wed, 23 Mar 2022 11:20:36 +0100 Subject: [PATCH] [MacOS] Add YQ tool to macOS images(#5144) (#5173) * Update toolset-10.15.json * Update toolset-11.json * Added Pester test and documentation update for YQ tool. * Change YQ version to full description with URL. * Add YQ to MacOS 12 --- images/macos/software-report/SoftwareReport.Common.psm1 | 5 +++++ images/macos/software-report/SoftwareReport.Generator.ps1 | 3 ++- images/macos/tests/BasicTools.Tests.ps1 | 6 ++++++ images/macos/toolsets/toolset-10.15.json | 5 +++-- images/macos/toolsets/toolset-11.json | 3 ++- images/macos/toolsets/toolset-12.json | 3 ++- 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/images/macos/software-report/SoftwareReport.Common.psm1 b/images/macos/software-report/SoftwareReport.Common.psm1 index df7ff83ef..69588aa0a 100644 --- a/images/macos/software-report/SoftwareReport.Common.psm1 +++ b/images/macos/software-report/SoftwareReport.Common.psm1 @@ -542,6 +542,11 @@ function Get-TclTkVersion { return "Tcl/Tk $tcltkVersion" } +function Get-YqVersion { + $yqVersion = Run-Command "yq --version" + return "$yqVersion" +} + function Build-PackageManagementEnvironmentTable { return @( @{ diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index e74d87816..857b69a62 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -122,7 +122,8 @@ $utilitiesList = @( (Get-GnuTarVersion), (Get-GPGVersion), (Get-SwitchAudioOsxVersion), - (Get-SoxVersion) + (Get-SoxVersion), + (Get-YqVersion) ) if ($os.IsLessThanMonterey) { diff --git a/images/macos/tests/BasicTools.Tests.ps1 b/images/macos/tests/BasicTools.Tests.ps1 index 7815ae9b5..f40a484bd 100644 --- a/images/macos/tests/BasicTools.Tests.ps1 +++ b/images/macos/tests/BasicTools.Tests.ps1 @@ -180,4 +180,10 @@ Describe "sbt" { It "sbt" { "sbt -version" | Should -ReturnZeroExitCode } +} + +Describe "yq" { + It "yq" { + "yq --version" | Should -ReturnZeroExitCode + } } \ No newline at end of file diff --git a/images/macos/toolsets/toolset-10.15.json b/images/macos/toolsets/toolset-10.15.json index d3c5d4959..7a956f54a 100644 --- a/images/macos/toolsets/toolset-10.15.json +++ b/images/macos/toolsets/toolset-10.15.json @@ -228,7 +228,8 @@ "zlib", "libxext", "libxft", - "tcl-tk" + "tcl-tk", + "yq" ], "cask_packages": [ "julia", @@ -353,4 +354,4 @@ "postgresql": { "version": "14" } -} \ No newline at end of file +} diff --git a/images/macos/toolsets/toolset-11.json b/images/macos/toolsets/toolset-11.json index 15d3c14ce..c268e9d32 100644 --- a/images/macos/toolsets/toolset-11.json +++ b/images/macos/toolsets/toolset-11.json @@ -203,7 +203,8 @@ "libxext", "libxft", "tcl-tk", - "r" + "r", + "yq" ], "cask_packages": [ "julia" diff --git a/images/macos/toolsets/toolset-12.json b/images/macos/toolsets/toolset-12.json index 91977f76b..674d2cb6b 100644 --- a/images/macos/toolsets/toolset-12.json +++ b/images/macos/toolsets/toolset-12.json @@ -119,7 +119,8 @@ "libxext", "libxft", "tcl-tk", - "r" + "r", + "yq" ], "cask_packages": [ "julia"