Skip to content

Include misc script outputs in local build #30092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 27 additions & 24 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,34 @@ task("lint").flags = {
" --f[iles]=<regex>": "pattern to match files to lint",
};

const buildCancellationToken = () => buildProject("src/cancellationToken");
const cleanCancellationToken = () => cleanProject("src/cancellationToken");
cleanTasks.push(cleanCancellationToken);

const buildTypingsInstaller = () => buildProject("src/typingsInstaller");
const cleanTypingsInstaller = () => cleanProject("src/typingsInstaller");
cleanTasks.push(cleanTypingsInstaller);

const buildWatchGuard = () => buildProject("src/watchGuard");
const cleanWatchGuard = () => cleanProject("src/watchGuard");
cleanTasks.push(cleanWatchGuard);

const generateTypesMap = () => src("src/server/typesMap.json")
.pipe(newer("built/local/typesMap.json"))
.pipe(transform(contents => (JSON.parse(contents), contents))) // validates typesMap.json is valid JSON
.pipe(dest("built/local"));
task("generate-types-map", generateTypesMap);

const cleanTypesMap = () => del("built/local/typesMap.json");
cleanTasks.push(cleanTypesMap);

const buildOtherOutputs = parallel(buildCancellationToken, buildTypingsInstaller, buildWatchGuard, generateTypesMap);
task("other-outputs", series(preBuild, buildOtherOutputs));
task("other-outputs").description = "Builds miscelaneous scripts and documents distributed with the LKG";

const buildFoldStart = async () => { if (fold.isTravis()) console.log(fold.start("build")); };
const buildFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("build")); };
task("local", series(buildFoldStart, preBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl), buildFoldEnd));
task("local", series(buildFoldStart, preBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildOtherOutputs), buildFoldEnd));
task("local").description = "Builds the full compiler and services";
task("local").flags = {
" --built": "Compile using the built version of the compiler."
Expand Down Expand Up @@ -551,28 +576,6 @@ const buildReleaseTsc = () => buildProject("src/tsc/tsconfig.release.json");
const cleanReleaseTsc = () => cleanProject("src/tsc/tsconfig.release.json");
cleanTasks.push(cleanReleaseTsc);

const buildCancellationToken = () => buildProject("src/cancellationToken");
const cleanCancellationToken = () => cleanProject("src/cancellationToken");
cleanTasks.push(cleanCancellationToken);

const buildTypingsInstaller = () => buildProject("src/typingsInstaller");
const cleanTypingsInstaller = () => cleanProject("src/typingsInstaller");
cleanTasks.push(cleanTypingsInstaller);

const buildWatchGuard = () => buildProject("src/watchGuard");
const cleanWatchGuard = () => cleanProject("src/watchGuard");
cleanTasks.push(cleanWatchGuard);

// TODO(rbuckton): This task isn't triggered by any other task. Is it still needed?
const generateTypesMap = () => src("src/server/typesMap.json")
.pipe(newer("built/local/typesMap.json"))
.pipe(transform(contents => (JSON.parse(contents), contents))) // validates typesMap.json is valid JSON
.pipe(dest("built/local"));
task("generate-types-map", generateTypesMap);

const cleanTypesMap = () => del("built/local/typesMap.json");
cleanTasks.push(cleanTypesMap);

const cleanBuilt = () => del("built");

const produceLKG = async () => {
Expand Down Expand Up @@ -602,7 +605,7 @@ const produceLKG = async () => {
}
};

task("LKG", series(lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildCancellationToken, buildTypingsInstaller, buildWatchGuard, buildReleaseTsc), produceLKG));
task("LKG", series(lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildOtherOutputs, buildReleaseTsc), produceLKG));
task("LKG").description = "Makes a new LKG out of the built js files";
task("LKG").flags = {
" --built": "Compile using the built version of the compiler.",
Expand Down