This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch fix/apidocs-automation
in repository https://gitbox.apache.org/repos/asf/lucenenet.git


The following commit(s) were added to refs/heads/fix/apidocs-automation by this 
push:
     new 1c68395bc docs.ps1: Restore to original
1c68395bc is described below

commit 1c68395bc02e14cd514439270d38fd723de5386c
Author: Shad Storhaug <[email protected]>
AuthorDate: Thu Oct 24 10:34:10 2024 +0700

    docs.ps1: Restore to original
---
 websites/apidocs/docs.ps1 | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1
index 9bafcf4ac..9a3d09436 100644
--- a/websites/apidocs/docs.ps1
+++ b/websites/apidocs/docs.ps1
@@ -62,29 +62,13 @@ $TocPath1 = Join-Path -Path $ApiDocsFolder -ChildPath 
"toc.yml"
 $TocPath2 = Join-Path -Path $ApiDocsFolder -ChildPath "toc\toc.yml"
 $BreadcrumbPath = Join-Path -Path $ApiDocsFolder -ChildPath 
"docfx.global.subsite.json"
 
-# The default local tools directory
-$InstallDir = "$RepoRoot/.dotnet/tools"
-$DocFxVersion = "2.77.0"
-$VersionedInstallDir = "$InstallDir/docfx/$DocFxVersion"
-
 # install docfx tool
+Write-Host "Restoring docfx tool..."
 $PreviousLocation = Get-Location
 Set-Location $RepoRoot
-
-
-# Ensure docfx is installed
-if (-not (Test-Path "$VersionedInstallDir")) {
-    Write-Host "docfx $DocFxVersion is not installed. Installing as a local 
tool..."
-    
-    # Install docfx as a local tool if it isn't listed in dotnet-tools.json
-    dotnet tool install --local docfx --tool-path "$VersionedInstallDir"
-}
+dotnet tool restore
 Set-Location $PreviousLocation
 
-& dotnet tool list --local
-# Verify that docfx is accessible
-& "$VersionedInstallDir/docfx" --version
-
 # delete anything that already exists
 if ($Clean) {
     Write-Host "Cleaning..."

Reply via email to