@@ -14,7 +14,7 @@ namespace DocFxForUnity
1414 ///
1515 /// </summary>
1616 /// <remarks>
17- /// [.NET](https://dotnet.microsoft.com) >= 9 .0 and [DocFX](https://dotnet.github.io/docfx/) must be installed
17+ /// [.NET](https://dotnet.microsoft.com) >= 7 .0 and [DocFX](https://dotnet.github.io/docfx/) must be installed
1818 /// on your system.
1919 /// </remarks>
2020 partial class Program
@@ -92,34 +92,25 @@ public static void Main()
9292 }
9393
9494 Console . WriteLine ( $ "Fixing hrefs in '{ xrefMapPath } '") ;
95- FixHrefs ( xrefMapPath , apiUrl : $ "https://docs.unity3d.com/{ version . name } /Documentation/ScriptReference/") ;
95+ Utils . CopyFile ( GeneratedXrefMapPath , xrefMapPath ) ;
96+ var xrefMap = XrefMap . Load ( xrefMapPath ) ;
97+ xrefMap . FixHrefs ( apiUrl : $ "https://docs.unity3d.com/{ version . name } /Documentation/ScriptReference/") ;
98+ xrefMap . Save ( xrefMapPath ) ;
9699
97100 // Set the last version's xref map as the default one
98101 if ( version == latestVersion )
99102 {
100103 Console . WriteLine ( $ "Fixing hrefs in '{ DefaultXrefMapPath } '") ;
101- FixHrefs ( DefaultXrefMapPath , UnityApiUrl ) ;
104+ Utils . CopyFile ( GeneratedXrefMapPath , DefaultXrefMapPath ) ;
105+ xrefMap = XrefMap . Load ( DefaultXrefMapPath ) ;
106+ xrefMap . FixHrefs ( UnityApiUrl ) ;
107+ xrefMap . Save ( DefaultXrefMapPath ) ;
102108 }
103109
104110 Console . WriteLine ( "\n " ) ;
105111 }
106112 }
107113
108- /// <summary>
109- /// Copies the generated xref map to <see cref="XrefMapsPath"/> and fixes its hrefs.
110- /// </summary>
111- /// <param name="xrefMapPath">Where to copy the xref map.</param>
112- /// <param name="apiUrl">The URL of the API documentation of this xref map.</param>
113- /// </summary>
114- private static void FixHrefs ( string xrefMapPath , string apiUrl )
115- {
116- Utils . CopyFile ( GeneratedXrefMapPath , xrefMapPath ) ;
117-
118- var xrefMap = XrefMap . Load ( xrefMapPath ) ;
119- xrefMap . FixHrefs ( apiUrl ) ;
120- xrefMap . Save ( xrefMapPath ) ;
121- }
122-
123114 /// <summary>
124115 /// Returns a collection of the latest versions of a specified repository of Unity.
125116 /// </summary>
0 commit comments