From 758e6ef26792c0e9dbb653721389793ccfd9374d Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Mon, 15 Mar 2021 21:05:15 +0300 Subject: [PATCH] add lerna version (#2914) --- .../SoftwareReport/SoftwareReport.Common.psm1 | 5 +++++ .../SoftwareReport.Generator.ps1 | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index e8a98317f..d0fa915e2 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -84,6 +84,11 @@ function Get-JuliaVersion { return "Julia $juliaVersion" } +function Get-LernaVersion { + $version = lerna -v + return "Lerna $version" +} + function Get-HomebrewVersion { $result = Get-CommandResult "brew -v" $result.Output -match "Homebrew (?\d+\.\d+\.\d+)" | Out-Null diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 766480894..e62c249be 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -77,14 +77,20 @@ $markdown += Build-PackageManagementEnvironmentTable | New-MDTable $markdown += New-MDNewLine $markdown += New-MDHeader "Project Management" -Level 3 -$markdown += New-MDList -Style Unordered -Lines (@( - (Get-AntVersion), - (Get-GradleVersion), - (Get-MavenVersion), - (Get-SbtVersion) - ) | Sort-Object +$projectManagementList = @( + (Get-AntVersion), + (Get-GradleVersion), + (Get-MavenVersion), + (Get-SbtVersion) ) +if (Test-IsUbuntu20) { + $projectManagementList += @( + (Get-LernaVersion) + ) +} +$markdown += New-MDList -Style Unordered -Lines ($projectManagementList | Sort-Object) + $markdown += New-MDHeader "Tools" -Level 3 $toolsList = @( (Get-7zipVersion),