From 4ca70c2b9b5c2dd636c4915dd7c8242472e08616 Mon Sep 17 00:00:00 2001 From: zoobestik Date: Mon, 30 Sep 2024 10:35:44 +0200 Subject: [PATCH] chore(ci): KTL-1676: remove obsolete fix-wrs script - eliminate redundant fix-wrs script from TeamCity - update build configuration to streamline processes --- .../buidTypes/BuildReferenceDocs.kt | 12 --------- .teamcity/scripts/fix-wrs/index.mjs | 27 ------------------- 2 files changed, 39 deletions(-) delete mode 100644 .teamcity/scripts/fix-wrs/index.mjs diff --git a/.teamcity/builds/kotlinlang/buidTypes/BuildReferenceDocs.kt b/.teamcity/builds/kotlinlang/buidTypes/BuildReferenceDocs.kt index 461038b4ae6..bd601ca4dd7 100644 --- a/.teamcity/builds/kotlinlang/buidTypes/BuildReferenceDocs.kt +++ b/.teamcity/builds/kotlinlang/buidTypes/BuildReferenceDocs.kt @@ -42,18 +42,6 @@ object BuildReferenceDocs : BuildType({ dockerImage = "alpine" dockerImagePlatform = ScriptBuildStep.ImagePlatform.Linux } - script { - name = "Fix WRS-6159" - scriptContent = """ - #!/usr/bin/env bash - ":" //# comment; exec /usr/bin/env node --input-type=module - "${'$'}@" < "${'$'}0" - - ${readScript("fix-wrs/index")} - """.trimIndent() - dockerImage = "node:22-slim" - dockerImagePlatform = ScriptBuildStep.ImagePlatform.Linux - dockerPull = true - } } dependencies { diff --git a/.teamcity/scripts/fix-wrs/index.mjs b/.teamcity/scripts/fix-wrs/index.mjs deleted file mode 100644 index eccb8460412..00000000000 --- a/.teamcity/scripts/fix-wrs/index.mjs +++ /dev/null @@ -1,27 +0,0 @@ -import { readdir, readFile, writeFile } from 'node:fs/promises'; -import { join, resolve } from 'node:path'; - -const ROOT_DIR = resolve('.'); -const DATA_DIR = join(ROOT_DIR, 'pages'); - -const toc = Object.keys(JSON.parse(await readFile(DATA_DIR + '/HelpTOC.json', 'utf8')).entities.pages); -const filelist = await readdir(DATA_DIR); - -console.log('total', filelist.length); - -const dels = filelist - .map(async fileName => { - if (!fileName.endsWith('.html')) return; - const key = fileName.replace(/\.html$/, ''); - if (toc.includes(key)) return; - - const file = DATA_DIR + '/' + fileName; - const text = await readFile(file); - if (!text.includes(')/g, '$1'); - console.log('exclude', file); - await writeFile(file, patched); - }); - -await Promise.all(dels); \ No newline at end of file