Skip to content

Commit

Permalink
fix: Reducing Verbosity of Conditional Builds ( re #907, re #914 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Mar 6, 2024
1 parent 1eebb9b commit dcb61cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Commands/PipeScript/Export-PipeScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,13 @@ function Export-Pipescript {
if ($commandAttribute.RegexPattern) {
if ($env:GITHUB_STEP_SUMMARY) {
@(
"* $($CommandInfo) has a Build Validation Pattern: (``$($commandAttribute.RegexPattern)``)."
"* $($CommandInfo) Validating Against: ``$ValidateAgainstString``"
"* $($CommandInfo) has a Build Validation Pattern: (``$($commandAttribute.RegexPattern)``)."
) -join [Environment]::Newline | Out-File -Path $env:GITHUB_STEP_SUMMARY -Append
}
$validationPattern = [Regex]::new($commandAttribute.RegexPattern, $commandAttribute.Options, '00:00:00.1')
if (-not $validationPattern.IsMatch($ValidateAgainstString)) {
if ($env:GITHUB_STEP_SUMMARY) {
"* 🖐️ Skipping $($CommandInfo) because $ValidateAgainstString did not match ($($commandAttribute.RegexPattern))" | Out-File -Path $env:GITHUB_STEP_SUMMARY -Append
"* 🖐️ Skipping $($CommandInfo) because commit did not match ($($commandAttribute.RegexPattern))" | Out-File -Path $env:GITHUB_STEP_SUMMARY -Append
}
Write-Warning "Skipping $($CommandInfo) : Did not match $($validationPattern)"
return $false
Expand Down

0 comments on commit dcb61cd

Please sign in to comment.