mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Reapply "emit compiler generated files for docs builds"
This reverts commit 51e3db55b3.
This commit is contained in:
parent
28052f0ae4
commit
dcec7de1ff
2 changed files with 27 additions and 5 deletions
|
|
@ -43,6 +43,10 @@
|
||||||
"VSCode"
|
"VSCode"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"IsDocsBuild": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Whether we are building for documentation - emits generated files"
|
||||||
|
},
|
||||||
"NoLogo": {
|
"NoLogo": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Disables displaying the NUKE logo"
|
"description": "Disables displaying the NUKE logo"
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ using Nuke.Common.IO;
|
||||||
using Nuke.Common.ProjectModel;
|
using Nuke.Common.ProjectModel;
|
||||||
using Nuke.Common.Tools.DotNet;
|
using Nuke.Common.Tools.DotNet;
|
||||||
using Nuke.Common.Tools.MSBuild;
|
using Nuke.Common.Tools.MSBuild;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
[UnsetVisualStudioEnvironmentVariables]
|
[UnsetVisualStudioEnvironmentVariables]
|
||||||
public class DalamudBuild : NukeBuild
|
public class DalamudBuild : NukeBuild
|
||||||
|
|
@ -22,6 +23,9 @@ public class DalamudBuild : NukeBuild
|
||||||
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
||||||
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
|
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
|
||||||
|
|
||||||
|
[Parameter("Whether we are building for documentation - emits generated files")]
|
||||||
|
readonly bool IsDocsBuild = false;
|
||||||
|
|
||||||
[Solution] Solution Solution;
|
[Solution] Solution Solution;
|
||||||
[GitRepository] GitRepository GitRepository;
|
[GitRepository] GitRepository GitRepository;
|
||||||
|
|
||||||
|
|
@ -60,10 +64,24 @@ public class DalamudBuild : NukeBuild
|
||||||
.DependsOn(Restore)
|
.DependsOn(Restore)
|
||||||
.Executes(() =>
|
.Executes(() =>
|
||||||
{
|
{
|
||||||
DotNetTasks.DotNetBuild(s => s
|
DotNetTasks.DotNetBuild(s =>
|
||||||
|
{
|
||||||
|
s = s
|
||||||
.SetProjectFile(DalamudProjectFile)
|
.SetProjectFile(DalamudProjectFile)
|
||||||
.SetConfiguration(Configuration)
|
.SetConfiguration(Configuration)
|
||||||
.EnableNoRestore());
|
.EnableNoRestore();
|
||||||
|
|
||||||
|
// We need to emit compiler generated files for the docs build, since docfx can't run generators directly
|
||||||
|
// TODO: This fails every build after this because of redefinitions...
|
||||||
|
if (IsDocsBuild)
|
||||||
|
{
|
||||||
|
Log.Warning("Building for documentation, emitting compiler generated files. This can cause issues on Windows due to path-length limitations");
|
||||||
|
s = s
|
||||||
|
.SetProperty("IsDocsBuild", "true");
|
||||||
|
}
|
||||||
|
|
||||||
|
return s;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Target CompileDalamudBoot => _ => _
|
Target CompileDalamudBoot => _ => _
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue