Skip to content

Commit 087f92f

Browse files
committed
Revert to ecaa7f9 (wrongly pushed old stashed commits)
1 parent 05f3a3c commit 087f92f

File tree

6 files changed

+22
-34
lines changed

6 files changed

+22
-34
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"docfx": {
6-
"version": "2.75.3",
6+
"version": "2.67.5",
77
"commands": [
88
"docfx"
99
]

.github/workflows/unity-xref-maps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
runs-on: windows-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v3
1717

1818
- name: Install DocFX
1919
run: dotnet tool restore
2020

2121
- name: Cache UnityCsReference
22-
uses: actions/cache@v4
22+
uses: actions/cache@v3
2323
with:
2424
path: UnityCsReference
2525
key: unitycsreference
@@ -28,7 +28,7 @@ jobs:
2828
run: dotnet run
2929

3030
- name: Deploy
31-
uses: peaceiris/actions-gh-pages@v4
31+
uses: peaceiris/actions-gh-pages@v3
3232
with:
3333
github_token: ${{ secrets.GITHUB_TOKEN }}
3434
publish_dir: _site

Program.cs

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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>

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ DocFX will set clickable all the references of the Unity API on your documentati
5353

5454
- To run this program:
5555

56-
1. Install [.NET 9.0](https://dotnet.microsoft.com/download/dotnet) SDK.
57-
2. Clone this repository on your computer.
58-
3. Open a terminal on the cloned repository and run:
56+
1. Install Visual Studio 2022.
57+
2. Install [.NET 7.0](https://dotnet.microsoft.com/download/dotnet) SDK.
58+
3. Clone this repository on your computer.
59+
4. Open a terminal on the cloned repository and run:
5960

6061
```sh
6162
dotnet tool restore

UnityXrefMaps.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net7.0</TargetFramework>
66
<DefaultItemExcludes>$(DefaultItemExcludes);UnityCsReference*\**</DefaultItemExcludes>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="LibGit2Sharp" Version="0.31.0" />
11-
<PackageReference Include="YamlDotNet" Version="16.3.0" />
10+
<PackageReference Include="LibGit2Sharp" Version="0.26.2" />
11+
<PackageReference Include="YamlDotNet" Version="12.3.1" />
1212
</ItemGroup>
1313

14-
</Project>
14+
</Project>

docfx.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
],
99
"filter": "filterConfig.yml",
1010
"dest": "UnityCsReference/_api",
11-
"disableGitFeatures": true,
12-
"noRestore": true,
13-
"properties": {
14-
"Configuration": "Debug"
15-
}
11+
"disableGitFeatures": true
1612
}
1713
],
1814
"build":

0 commit comments

Comments
 (0)