forked from MonoGame/docs.monogame.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
24 lines (19 loc) · 1.1 KB
/
Copy pathbuild.ps1
File metadata and controls
24 lines (19 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Exit on any error
$ErrorActionPreference = "Stop"
$FrameworkDll = "external/MonoGame/Artifacts/MonoGame.Framework/DesktopGL/Debug/MonoGame.Framework.dll"
$PipelineDll = "external/MonoGame/Artifacts/MonoGame.Framework.Content.Pipeline/Debug/MonoGame.Framework.Content.Pipeline.dll"
# Check if submodules are initialized
$submoduleStatus = git submodule status
if ($submoduleStatus -match '^-') {
Write-Host "Submodules not initialized. Running git submodule update..." -ForegroundColor Yellow
git submodule update --init --recursive
}
# Check if dlls are already built
if (-not (Test-Path $FrameworkDll) -or -not (Test-Path $PipelineDll)) {
Write-Host "Required Assemblies for documentation not found. Building assemblies..." -ForegroundColor Yellow
dotnet build external/MonoGame/MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.csproj -p:DisableNativeBuild=true
}
# Build documentation
Write-Host "Building DocFx..." -ForegroundColor Green
dotnet docfx docfx.json
Write-Host "Build and documentation generation completed successfully!" -ForegroundColor Green