You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2021/03/25 10:36:58 UTC

[lucenenet] 06/08: docs.ps1: Update toc.yml to the latest documentation version to prevent issues with crosslinking to older documentation. (see #300)

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

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit ea67745b1f853c0ab6c06498cd49bb22818ba889
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Thu Mar 25 07:54:06 2021 +0700

    docs.ps1: Update toc.yml to the latest documentation version to prevent issues with crosslinking to older documentation. (see #300)
---
 websites/apidocs/docs.ps1 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1
index 2e22aab..8292adc 100644
--- a/websites/apidocs/docs.ps1
+++ b/websites/apidocs/docs.ps1
@@ -52,6 +52,7 @@ $RepoRoot = (get-item $PSScriptFilePath).Directory.Parent.Parent.FullName;
 $ApiDocsFolder = Join-Path -Path $RepoRoot -ChildPath "websites\apidocs";
 $ToolsFolder = Join-Path -Path $ApiDocsFolder -ChildPath "tools";
 $CliIndexPath = Join-Path -Path $RepoRoot -ChildPath "src\dotnet\tools\lucene-cli\docs\index.md";
+$TocPath = Join-Path -Path $ApiDocsFolder -ChildPath "toc.yml"
 #ensure the /build/tools folder
 New-Item $ToolsFolder -type directory -force
 
@@ -185,6 +186,9 @@ if ($? -and $DisableBuild -eq $false) {
     # Note it works better this way anyway because we can store a real version number in the file in the repo.
     (Get-Content -Path $CliIndexPath -Raw) -Replace '(?<=--version\s)\d+?\.\d+?\.\d+?(?:\.\d+?)?(?:-\w+)?', $LuceneNetVersion | Set-Content -Path $CliIndexPath
 
+    # Update our TOC to the latest LuceneNetVersion
+    (Get-Content -Path $TocPath -Raw) -Replace '(?<=lucenenet\.apache\.org\/docs\/)\d+?\.\d+?\.\d+?(?:\.\d+?)?(?:-\w+)?', $LuceneNetVersion | Set-Content -Path $TocPath
+
     foreach ($proj in $DocFxJsonMeta) {
         $projFile = Join-Path -Path $ApiDocsFolder $proj