Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions scripts/getLatestVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ $file = get-item $propertiesPath
$findVersions = $file | Select-String -Pattern "mavenMajorVersion" -Context 0,2
$findVersions = $findVersions -split "`r`n"

$majorVersion = $findVersions[0].Substring($findVersions[0].Length-1)
$minorVersion = $findVersions[1].Substring($findVersions[1].Length-1)
$patchVersion = $findVersions[2].Substring($findVersions[2].Length-1)
$versionIndex = $findVersions[0].IndexOf("=")
$majorVersion = $findVersions[0].Substring($versionIndex+2)
$minorVersion = $findVersions[1].Substring($versionIndex+2)
$patchVersion = $findVersions[2].Substring($versionIndex+2)
$version = "$majorVersion.$minorVersion.$patchVersion"

#Update the VERSION_STRING env variable and inform the user
Write-Host "##vso[task.setVariable variable=VERSION_STRING]$($version)";
Write-Host "Updated the VERSION_STRING enviornment variable with the current Gradle.Properties, $version"
Write-Host "Updated the VERSION_STRING enviornment variable with the current Gradle.Properties, $version"