From 2c16ee311e57635bf08cf5fe5c2f3340835d9408 Mon Sep 17 00:00:00 2001 From: Mine Starks <16928427+minestarks@users.noreply.github.com> Date: Thu, 20 Feb 2020 11:41:53 -0800 Subject: [PATCH] Copy diagnostic messages to built/local to fix localization process (#36903) * Copy diagnostic messages to built/local * Add description for built/local/diagnosticMessages.generated.json --- Gulpfile.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Gulpfile.js b/Gulpfile.js index 906818e5d4e..94212344d38 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -408,7 +408,18 @@ task("generate-types-map", generateTypesMap); const cleanTypesMap = () => del("built/local/typesMap.json"); cleanTasks.push(cleanTypesMap); -const buildOtherOutputs = parallel(buildCancellationToken, buildTypingsInstaller, buildWatchGuard, generateTypesMap); +// Drop a copy of diagnosticMessages.generated.json into the built/local folder. This allows +// it to be synced to the Azure DevOps repo, so that it can get picked up by the build +// pipeline that generates the localization artifacts that are then fed into the translation process. +const builtLocalDiagnosticMessagesGeneratedJson = "built/local/diagnosticMessages.generated.json"; +const copyBuiltLocalDiagnosticMessages = () => src(diagnosticMessagesGeneratedJson) + .pipe(newer(builtLocalDiagnosticMessagesGeneratedJson)) + .pipe(dest("built/local")); + +const cleanBuiltLocalDiagnosticMessages = () => del(builtLocalDiagnosticMessagesGeneratedJson); +cleanTasks.push(cleanBuiltLocalDiagnosticMessages); + +const buildOtherOutputs = parallel(buildCancellationToken, buildTypingsInstaller, buildWatchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages); task("other-outputs", series(preBuild, buildOtherOutputs)); task("other-outputs").description = "Builds miscelaneous scripts and documents distributed with the LKG";