Skip to content

Commit

Permalink
Add logs (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
qetza authored Feb 19, 2021
1 parent 60a5b6e commit 018b3b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion task/transform.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ try
Add-Type -Path "${PSScriptRoot}\Microsoft.Web.XmlTransform.dll"

# apply transforms
$transforms -split "(?:`n`r?)|," | % {
$transformsCount = 0

$transforms -split "(?:`n`r?)|," | ForEach-Object {
$rule = $_.Trim()

if (!$rule)
Expand Down Expand Up @@ -152,13 +154,17 @@ try
}

_ApplyTransform -TransformFile $transformFile.FullName -SourceFile $sourceFile -OutputFile $outputFile
++$transformsCount
}
}
else
{
_ApplyTransform -SourceFile $defs.SourcePattern -TransformFile $defs.TransformPattern -OutputFile $defs.OutputPattern
++$transformsCount
}
}

Write-Host "transformed ${transformsCount} file(s)."
}
finally
{
Expand Down

0 comments on commit 018b3b5

Please sign in to comment.