diff --git a/Jenkinsfile b/Jenkinsfile index 0efed6f..23d79bf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -98,8 +98,14 @@ powershell -NoProfile -ExecutionPolicy Bypass -File gitea-release.ps1 writeFile file: 'taiga-post.ps1', text: ''' $ErrorActionPreference = "Continue" -$commitMsg = git log -1 --pretty=%B -$match = [regex]::Match($commitMsg, 'TG-(\\d+)') +$commitMsg = git log -1 --pretty=%B 2>$null + +if ([string]::IsNullOrWhiteSpace($commitMsg)) { + Write-Host "No git commit message available" + exit 0 +} + +$match = [regex]::Match($commitMsg, 'TG-(\d+)') if (-not $match.Success) { Write-Host "No TG-* reference found"