Skip to content

Commit

Permalink
Add a build task which bumps package.json and LKG together to a nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Jan 11, 2023
1 parent c3be4fb commit c0f843f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Herebyfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { task } from "hereby";
import _glob from "glob";
import util from "util";
import chalk from "chalk";
import fsExtra from "fs-extra";
import { Debouncer, Deferred, exec, getDiffTool, getDirSize, memoize, needsUpdate, readJson } from "./scripts/build/utils.mjs";
import { localBaseline, localRwcBaseline, refBaseline, refRwcBaseline, runConsoleTests } from "./scripts/build/tests.mjs";
import { buildProject, cleanProject, watchProject } from "./scripts/build/projects.mjs";
Expand Down Expand Up @@ -854,3 +855,14 @@ export const help = task({
hiddenFromTaskList: true,
run: () => exec("hereby", ["--tasks"], { hidePrompt: true }),
});

export const bumpLkgToNightly = task({
name: "bump-lkg-to-nightly",
description: "Bumps typescript in package.json to the latest nightly and copies it to LKG.",
run: async () => {
await exec("npm", ["install", "--save-dev", "--save-exact", "typescript@next"]);
await fs.promises.rm("lib", { recursive: true, force: true });
await fsExtra.copy("node_modules/typescript/lib", "lib");
await fs.promises.writeFile("lib/.gitattributes", "* text eol=lf");
}
});

0 comments on commit c0f843f

Please sign in to comment.