Skip to content

Commit

Permalink
Update doc scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ashtum committed Apr 10, 2024
1 parent 0eb8339 commit d95319d
Show file tree
Hide file tree
Showing 5 changed files with 929 additions and 319 deletions.
21 changes: 21 additions & 0 deletions doc/build_antora.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@echo off
setlocal

if "%~1"=="" (
echo No playbook supplied, using default playbook
set "PLAYBOOK=local-playbook.yml"
) else (
set "PLAYBOOK=%~1"
)

echo Building documentation with Antora...
echo Installing npm dependencies...
call npm ci

echo Building docs in custom dir...
call "C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
set "PATH=%PATH%;C:\Program Files\7-Zip"
set "PATH=%PATH%;%CD%\node_modules\.bin"
call npx antora --clean --fetch "%PLAYBOOK%"
echo Done
6 changes: 3 additions & 3 deletions doc/generate-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ if (isBoostDir(cwdParentParent)) {
// Delete `self` from boost/libs
const selfDir = path.join(boostDir, 'libs', self)
console.log(`Deleting ${selfDir}`)
execSync(`rm -rf ${selfDir}`)
fs.rmSync(selfDir, { recursive: true, force: true })

// Copy contents of cwd to boost/libs/self
// const selfDirParent = path.join(boostDir, 'libs')
console.log(`Copying ${cwd} to ${selfDir}`)
execSync(`cp -r ${cwd} ${selfDir}`)
fs.cpSync(cwd, selfDir, {recursive: true})
}

/*
Expand Down Expand Up @@ -252,7 +252,7 @@ try {
}
if (tempDir) {
console.log(`Deleting temporary directory ${tempDir}`)
execSync(`rm -rf ${tempDir}`)
fs.rmSync(tempDir, { recursive: true, force: true })
}
console.log(`Generated documentation at ${mrDocsOutputDir}`)
process.exit(mrDocsExitCode)
2 changes: 1 addition & 1 deletion doc/lib/cpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
const path = require('path');
const fs = require('fs');
const xpath = require('xpath');
const DOMParser = require('xmldom').DOMParser;
const DOMParser = require('@xmldom/xmldom').DOMParser;

/*
Load tag files
Expand Down
Loading

0 comments on commit d95319d

Please sign in to comment.