vcpkg/scripts/azure-pipelines/windows/Check-CMakeFunctionDocumentation.ps1
nicole mazzuca 6b117c9c7e
[vcpkg docs] Check for documentation generation in CI (#14614)
* [vcpkg docs] Change how documenting port functions works

Instead of using `##`, use comment blocks for documentation.

Also, add some minor docs and change RST -> MD
so we actually get docs generated.

* add CI stuff

* regenerate docs

* fix vcpkg_find_acquire_program to not use _execute_process
2020-12-01 13:37:26 -08:00

31 lines
669 B
PowerShell

[CmdletBinding()]
Param(
[Parameter(Mandatory=$True)]
[string]$Root
)
if (-not (Test-Path "$Root/.vcpkg-root"))
{
Write-Error "The vcpkg root was not at $Root"
throw
}
& "$Root/docs/regenerate.ps1" -VcpkgRoot $Root -WarningAction 'Stop'
$changedFiles = & "$PSScriptRoot/Get-ChangedFiles.ps1" -Directory "$Root/docs"
if ($null -ne $changedFiles)
{
$msg = @(
"",
"The documentation files do not seem to have been regenerated.",
"Please re-run `docs/regenerate.ps1`."
)
$msg += ""
$msg += "This should produce the following diff:"
$msg += git diff "$Root/docs"
Write-Error ($msg -join "`n")
throw
}