From 80a48cfd458e0d2fd50907b52394dd45d92d895f Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Wed, 17 Jun 2020 20:36:36 +0300 Subject: [PATCH] [Windows] Add sbt to software report generator (#1065) * add sbt * more readable solution --- images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 | 5 +++++ .../win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 index d7e864bb8..6f087bdb0 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -149,6 +149,11 @@ function Get-GradleVersion { return "Gradle $gradleVersion" } +function Get-SbtVersion { + $sbtVersion = (sbt -version) -match "sbt script version:" -replace "script version: " + return "$sbtVersion" +} + function Get-DotnetSdks { $sdksRawList = dotnet --list-sdks $sdkVersions = ($sdksRawList | Foreach-Object {$_.Split()[0]}) -join ' ' diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index ec47b99b3..644080be4 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -56,7 +56,8 @@ $markdown += New-MDHeader "Project Management" -Level 3 $markdown += New-MDList -Style Unordered -Lines @( (Get-AntVersion), (Get-MavenVersion), - (Get-GradleVersion) + (Get-GradleVersion), + (Get-SbtVersion) ) $markdown += New-MDHeader "Tools" -Level 3