Merge pull request #1287 from r15ch13/fix-ps3

Remove -SkipLast to restore Powershell 3 compatibility (fixes #1278)
This commit is contained in:
Luke Sampson
2017-01-31 08:25:41 +11:00
committed by GitHub
+2 -1
View File
@@ -141,7 +141,8 @@ function get_version_substitutions([String] $version, [Hashtable] $matches)
'$buildVersion' = $firstPart.Split('.') | Select-Object -skip 3 -first 1;
'$preReleaseVersion' = $lastPart;
}
$matches.GetEnumerator() | Select -SkipLast 1 | % {
$matches.Remove(0)
$matches.GetEnumerator() | % {
$versionVariables.Add('$match' + (Get-Culture).TextInfo.ToTitleCase($_.Name), $_.Value)
}
return $versionVariables