1
0
mirror of synced 2026-08-04 01:07:02 +00:00

do full sync when Antora reverts to running a full build (#12263)

This commit is contained in:
Dan Allen
2022-11-22 08:06:56 -07:00
committed by GitHub
parent 51fa7c0c34
commit 35bdfa87a0
2 changed files with 8 additions and 2 deletions
@@ -1,7 +1,8 @@
'use strict'
const execFile = require('node:util').promisify(require('node:child_process').execFile)
const { promises: fsp } = require('node:fs')
const fsp = require('node:fs/promises')
const ospath = require('node:path')
module.exports.register = function () {
if (!process.env.BUILD_REFNAME) return
@@ -26,7 +27,8 @@ module.exports.register = function () {
const versionsInManifest = siteManifestData.components.ROOT.versions
if (!(version in versionsInManifest && isBranch === !!versionsInManifest[version].prerelease)) {
const category = require('path').basename(module.id, '.js')
this.getLogger(category).info(`version ${version} not previously built; reverting to full build`)
await fsp.writeFile(ospath.join(playbook.dir, '.full-build'), '')
console.log(`version ${version} not previously built; reverting to full build`)
return
}
Object.assign(