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 @@ -21,11 +21,12 @@ $file = get-item $propertiesPath
2121$findVersions = $file | Select-String - Pattern " mavenMajorVersion" - Context 0 , 2
2222$findVersions = $findVersions -split " `r`n "
2323
24- $majorVersion = $findVersions [0 ].Substring($findVersions [0 ].Length- 1 )
25- $minorVersion = $findVersions [1 ].Substring($findVersions [1 ].Length- 1 )
26- $patchVersion = $findVersions [2 ].Substring($findVersions [2 ].Length- 1 )
24+ $versionIndex = $findVersions [0 ].IndexOf(" =" )
25+ $majorVersion = $findVersions [0 ].Substring($versionIndex + 2 )
26+ $minorVersion = $findVersions [1 ].Substring($versionIndex + 2 )
27+ $patchVersion = $findVersions [2 ].Substring($versionIndex + 2 )
2728$version = " $majorVersion .$minorVersion .$patchVersion "
2829
2930# Update the VERSION_STRING env variable and inform the user
3031Write-Host " ##vso[task.setVariable variable=VERSION_STRING]$ ( $version ) " ;
31- Write-Host " Updated the VERSION_STRING enviornment variable with the current Gradle.Properties, $version "
32+ 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