mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-11 17:39:04 +08:00
6b117c9c7e
* [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
31 lines
669 B
PowerShell
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
|
|
}
|