Skip to content

Instantly share code, notes, and snippets.

View jmaxxz's full-sized avatar

Jmaxxz jmaxxz

View GitHub Profile
param([string]$buildCounter, [string]$branchName, [string]$defaultPrefix)
Write-Host "Getting build number from branch"
$versionPrefix=$defaultPrefix
$matches = [regex]::Match($branchName, "release-v(?<version>\d+\.\d+)\.x")
if ($matches.success)
{
$versionPrefix = $matches.groups["version"].value
}