From ffbcaa7854620e2d260de98869b05862550de5c2 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Thu, 24 Sep 2020 15:07:30 +0300 Subject: [PATCH 1/3] add missing tools to ubuntu docs --- .../SoftwareReport/SoftwareReport.Generator.ps1 | 4 ++++ .../scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 73a8d63e7..5c93cdd5b 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -101,7 +101,11 @@ $toolsList = @( (Get-NewmanVersion), (Get-NvmVersion), (Get-PackerVersion), + ("Pollinate"), (Get-PhantomJSVersion), + (Get-PulumiVersion), + (Get-RVersion), + ("Sphinx Open Source Search Server"), (Get-SwigVersion), (Get-TerraformVersion), (Get-UnZipVersion), diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index dcb121f61..43828d48a 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -247,3 +247,13 @@ function Get-ORASCliVersion { function Get-VerselCliversion { return "$(vercel --version 2>&1 | Select-Object -First 1)" } + +function Get-PulumiVersion { + $pulumiVersion = pulumi version | Take-OutputPart -Part 0 -Delimiter "v" + return "Pulumi $pulumiVersion" +} + +function Get-RVersion { + $rVersion = R --version | Select-String "R version" | Take-OutputPart -Part -2 + return "R $rVersion" +} From 3500bbdf3e471b887d4e4b99aecefd79d9d61d80 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Thu, 24 Sep 2020 16:50:28 +0300 Subject: [PATCH 2/3] add sphinx version and remove pollinate --- .../scripts/SoftwareReport/SoftwareReport.Generator.ps1 | 3 +-- .../linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 5c93cdd5b..f4dce82c7 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -101,11 +101,10 @@ $toolsList = @( (Get-NewmanVersion), (Get-NvmVersion), (Get-PackerVersion), - ("Pollinate"), (Get-PhantomJSVersion), (Get-PulumiVersion), (Get-RVersion), - ("Sphinx Open Source Search Server"), + (Get-SphinxVersion), (Get-SwigVersion), (Get-TerraformVersion), (Get-UnZipVersion), diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 43828d48a..35b5ec4de 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -257,3 +257,8 @@ function Get-RVersion { $rVersion = R --version | Select-String "R version" | Take-OutputPart -Part -2 return "R $rVersion" } + +function Get-SphinxVersion { + $sphinxVersion = searchd | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" + return "Sphinx Open Source Search Server $rVersion" +} \ No newline at end of file From 85906da062ec55b2ab9d0f1070fc0df0be114f3c Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Thu, 24 Sep 2020 23:39:14 +0300 Subject: [PATCH 3/3] fix R and sphinx version output --- .../linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 35b5ec4de..99fad98b3 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -254,11 +254,11 @@ function Get-PulumiVersion { } function Get-RVersion { - $rVersion = R --version | Select-String "R version" | Take-OutputPart -Part -2 + $rVersion = (Get-CommandResult "R --version | grep 'R version'").Output | Take-OutputPart -Part 2 return "R $rVersion" } function Get-SphinxVersion { - $sphinxVersion = searchd | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" - return "Sphinx Open Source Search Server $rVersion" + $sphinxVersion = searchd -h | Select-Object -First 1 | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" + return "Sphinx Open Source Search Server $sphinxVersion" } \ No newline at end of file