From 9a268303fb52da116da5f7a6bb0e56f12486edde Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Fri, 16 Oct 2020 15:38:06 +0300 Subject: [PATCH] fix gradle version --- .../linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 14d4a18e..1989caf4 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -144,17 +144,17 @@ function Get-AntVersion { } function Get-GradleVersion { - $result = gradle -v | Out-String - $result -match "Gradle (?\d+\.\d+\.\d+)" | Out-Null - $gradleVersion = $Matches.version + $gradleVersion = (gradle -v) -match "^Gradle \d" | Take-OutputPart -Part 1 return "Gradle $gradleVersion" } + function Get-MavenVersion { $result = mvn -version | Out-String $result -match "Apache Maven (?\d+\.\d+\.\d+)" | Out-Null $mavenVersion = $Matches.version return "Maven $mavenVersion" } + function Get-SbtVersion { $result = Get-CommandResult "sbt -version" $result.Output -match "sbt script version: (?\d+\.\d+\.\d+)" | Out-Null