1
0
mirror of synced 2025-12-23 11:54:18 -05:00

remove enterprise and lunr sync search workflows (#32430)

This commit is contained in:
Rachael Sewell
2022-11-07 14:36:30 -08:00
committed by GitHub
parent ca22e90b38
commit 1256add363
5 changed files with 1 additions and 274 deletions

View File

@@ -16,7 +16,6 @@ const webhooksStaticDir = path.join(process.cwd(), 'lib/webhooks/static')
const graphqlStaticDir = path.join(process.cwd(), 'lib/graphql/static')
const restDecoratedDir = path.join(process.cwd(), 'lib/rest/static/decorated')
const restDereferencedDir = path.join(process.cwd(), 'lib/rest/static/dereferenced')
const lunrIndexDir = path.join(process.cwd(), 'lib/search/indexes')
const supportedEnterpriseVersions = Object.values(allVersions).filter(
(v) => v.plan === 'enterprise-server'
@@ -48,13 +47,6 @@ const openApiBaseName = supportedEnterpriseVersions.map((v) => v.openApiBaseName
removeFiles(dir, openApiBaseName, supportedOpenApiVersions)
})
// Lunr
const lunrBaseName = 'github-docs-'
const supportedLunrVersions = Object.values(allVersions).map((v) =>
v.miscVersionName.replace('ghes-', '')
)
removeFiles(lunrIndexDir, lunrBaseName, supportedLunrVersions)
function removeFiles(dir, baseName, supportedVersions) {
fs.readdirSync(dir)
.filter((file) => file.includes(baseName))