Fix regular expression for PowerShell DCO check

Signed-off-by: John Stephens <johnstep@docker.com>
This commit is contained in:
John Stephens 2016-12-20 15:32:39 -08:00
parent b1cb897998
commit 0ce6c12f88
No known key found for this signature in database
GPG key ID: 240549B2101E94D4

View file

@ -184,7 +184,7 @@ Function Validate-DCO($headCommit, $upstreamCommit) {
$usernameRegex='[a-zA-Z0-9][a-zA-Z0-9-]+'
$dcoPrefix="Signed-off-by:"
$dcoRegex="^(Docker-DCO-1.1-)?$dcoPrefix ([^<]+) <([^<>@]+@[^<>]+)>( \\(github: ($usernameRegex)\\))?$"
$dcoRegex="^(Docker-DCO-1.1-)?$dcoPrefix ([^<]+) <([^<>@]+@[^<>]+)>( \(github: ($usernameRegex)\))?$"
$counts = Invoke-Expression "git diff --numstat $upstreamCommit...$headCommit"
if ($LASTEXITCODE -ne 0) { Throw "Failed git diff --numstat" }