File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,12 @@ $file = get-item $propertiesPath
2323$findVersions = $file | Select-String - Pattern " mavenMajorVersion" - Context 0 , 2
2424$findVersions = $findVersions -split " `r`n "
2525
26- $majorVersion = $findVersions [0 ].Substring($findVersions [0 ].Length- 1 )
27- $minorVersion = $findVersions [1 ].Substring($findVersions [1 ].Length- 1 )
28- $patchVersion = $findVersions [2 ].Substring($findVersions [2 ].Length- 1 )
26+ $versionIndex = $findVersions [0 ].IndexOf(" =" )
27+ $majorVersion = $findVersions [0 ].Substring($versionIndex + 2 )
28+ $minorVersion = $findVersions [1 ].Substring($versionIndex + 2 )
29+ $patchVersion = $findVersions [2 ].Substring($versionIndex + 2 )
2930$version = " $majorVersion .$minorVersion .$patchVersion "
3031
3132# Update the VERSION_STRING env variable and inform the user
3233Write-Host " ##vso[task.setVariable variable=VERSION_STRING]$ ( $version ) " ;
33- Write-Host " Updated the VERSION_STRING enviornment variable with the current Gradle.Properties, $version "
34+ Write-Host " Updated the VERSION_STRING enviornment variable with the current Gradle.Properties, $version "
You can’t perform that action at this time.
0 commit comments