Fix up some of the ignore files, and removing the create language service script (#33684)
* Fix up some of the ignore files, and removing the create script * Update .dockerignore
This commit is contained in:
Родитель
1c42c1aaa8
Коммит
b9fe84e591
|
@ -22,7 +22,6 @@ scripts/buildProtocol.js
|
|||
scripts/ior.js
|
||||
scripts/authors.js
|
||||
scripts/configurePrerelease.js
|
||||
scripts/configureTSCBuild.js
|
||||
scripts/open-user-pr.js
|
||||
scripts/open-cherry-pick-pr.js
|
||||
scripts/processDiagnosticMessages.d.ts
|
||||
|
@ -30,6 +29,7 @@ scripts/processDiagnosticMessages.js
|
|||
scripts/produceLKG.js
|
||||
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
|
||||
scripts/generateLocalizedDiagnosticMessages.js
|
||||
scripts/configureLanguageServiceBuild.js
|
||||
scripts/*.js.map
|
||||
scripts/typings/
|
||||
coverage/
|
||||
|
|
|
@ -46,7 +46,6 @@ scripts/ior.js
|
|||
scripts/authors.js
|
||||
scripts/configurePrerelease.js
|
||||
scripts/configureLanguageServiceBuild.js
|
||||
scripts/createLanguageServiceBuild.js
|
||||
scripts/open-user-pr.js
|
||||
scripts/open-cherry-pick-pr.js
|
||||
scripts/processDiagnosticMessages.d.ts
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
/// <reference types="node"/>
|
||||
import { join } from "path";
|
||||
import { readFileSync, unlinkSync } from "fs";
|
||||
import { tmpdir } from "os";
|
||||
import { execSync, ExecSyncOptions } from "child_process";
|
||||
import chalk from "chalk";
|
||||
|
||||
interface PackageJson {
|
||||
name: string;
|
||||
version: string
|
||||
}
|
||||
|
||||
const exec = (cmd: string, opts?: ExecSyncOptions) => {
|
||||
console.log(chalk.gray(`> ${cmd} ${opts ? JSON.stringify(opts) : ""}`));
|
||||
execSync(cmd, opts);
|
||||
};
|
||||
|
||||
const step = (msg: string) => {
|
||||
console.log("\n\n" + chalk.bold("- ") + msg);
|
||||
};
|
||||
|
||||
function main(): void {
|
||||
console.log(chalk.bold("## Creating the language services build of TypeScript"));
|
||||
process.stdout.write(chalk.grey("> node /scripts/createLanguageServiceBuild.ts"));
|
||||
|
||||
// Create a tarball of the current version
|
||||
step("Packing the current TypeScript via npm.");
|
||||
exec("npm pack");
|
||||
|
||||
const packageJsonValue: PackageJson = JSON.parse(readFileSync("package.json", "utf8"));
|
||||
const tarballFileName = `${packageJsonValue.name}-${packageJsonValue.version}.tgz`;
|
||||
|
||||
const unzipDir = tmpdir();
|
||||
step(`Extracting the built version into a temporary folder. ${unzipDir}/package`);
|
||||
exec(`tar -xvzf ${tarballFileName} -C ${unzipDir}`);
|
||||
unlinkSync(tarballFileName);
|
||||
|
||||
step(`Updating the build metadata`);
|
||||
const packagePath = join(unzipDir, "package");
|
||||
exec(`node scripts/configureLanguageServiceBuild.js ${join(packagePath, "package.json")}`);
|
||||
|
||||
step(`Deploying the language service`);
|
||||
exec("npm publish --access public", { cwd: packagePath });
|
||||
}
|
||||
|
||||
main();
|
Загрузка…
Ссылка в новой задаче