diff --git a/README.md b/README.md index cf7a6cf..818d18f 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ If local html pages don't appear to be updating, hard refresh website pages in b If there are discrepancies between local and remote builds: * Confirm local and remote docfx versions are consistent. This inconsistency can occur when, for example, running `docfx` instead of `dotnet docfx` or running `dotnet tool restore --configfile ` on another config file other than the one in this repo. -* Clear the local any cached files that aren't available remotely. Such files exist in the `api` directory (though care to not delete the `.gitignore` in that directory), the `_site` directory, and the workflows directory. Run `./docfx-util.ps1 -c` to clean artifacts from previous builds. +* Clear any locally cached files that aren't available remotely. Such files exist in the `api` directory (though care to not delete the `.gitignore` in that directory), the `_site` directory, and the workflows directory. Run `./docfx-util.ps1 -c` to clean artifacts from previous builds. ## Docs Maintainability diff --git a/docfx-util.ps1 b/docfx-util.ps1 deleted file mode 100644 index 6d22d92..0000000 --- a/docfx-util.ps1 +++ /dev/null @@ -1,57 +0,0 @@ - -[CmdletBinding(PositionalBinding=$false)] -param -( - [parameter(mandatory=$false)][switch][Alias('c')]$clean, - [parameter(mandatory=$false)][switch][Alias('d')]$doclinkchecker, - [parameter(mandatory=$false)][string][Alias('l')]$lychee, - [parameter(mandatory=$false)][string][Alias('a')]$all -) - - - -# this is called removeartifacts instead of clean because clean might be taken up by another name -function removeartifacts -{ - $deletePaths = '.\workflows\*.svg', '.\api\*.yml', '.\api\.manifest', '.\_site\', '.\_raw\', '.\_view\' - foreach($deletePath in $deletePaths) - { - if (Test-Path $deletePath) { - Remove-Item $deletePath -Recurse - } - } -} - -function doclinkchecker -{ - .\build.ps1 --logLevel Warning --warningsAsErrors - dotnet DocLinkChecker -v -f .github/workflows/DocLinkChecker.config -} - -function lychee -{ - param($lycheePath) - Invoke-Expression "& `"$lycheePath`" --verbose --no-progress --base _site --exclude ^https://github\.com.*merge.* --exclude ^https://github\.com.*apiSpec.* '_site/**/*.html'" -} - -if ($clean) -{ - removeartifacts -} - -if ($doclinkchecker) -{ - doclinkchecker -} - -If ($PSBoundParameters.ContainsKey('lychee')) -{ - lychee($lychee) -} - -If ($PSBoundParameters.ContainsKey('all')) -{ - removeartifacts - doclinkchecker - lychee($all) -} \ No newline at end of file