diff options
Diffstat (limited to 'scripts/azure-pipelines/Create-FormatDiff.ps1')
| -rw-r--r-- | scripts/azure-pipelines/Create-FormatDiff.ps1 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/azure-pipelines/Create-FormatDiff.ps1 b/scripts/azure-pipelines/Create-FormatDiff.ps1 new file mode 100644 index 000000000..599118089 --- /dev/null +++ b/scripts/azure-pipelines/Create-FormatDiff.ps1 @@ -0,0 +1,20 @@ +[CmdletBinding(PositionalBinding=$False)] +Param( + [Parameter(Mandatory=$True)] + [String]$DiffFile +) + +Start-Process -FilePath 'git' -ArgumentList 'diff' ` + -NoNewWindow -Wait ` + -RedirectStandardOutput $DiffFile +if (0 -ne (Get-Item -LiteralPath $DiffFile).Length) +{ + $msg = @( + 'The formatting of the files in the repo were not what we expected,', + 'or the documentation was not regenerated.', + 'Please access the diff from format.diff in the build artifacts,' + 'and apply the patch with `git apply`' + ) + Write-Error ($msg -join "`n") + throw +}
\ No newline at end of file |
