Archived
1
0

Clone exact vscode release branch when build task (#167)

* chore: clone exactly release branch when build

* fix: clone params
This commit is contained in:
赵吉彤 2019-03-10 23:02:08 +08:00 committed by Kyle Carberry
parent 41d1be9205
commit 4387fdfb9e

View File

@ -10,6 +10,7 @@ const libPath = path.join(__dirname, "../lib");
const vscodePath = path.join(libPath, "vscode"); const vscodePath = path.join(libPath, "vscode");
const pkgsPath = path.join(__dirname, "../packages"); const pkgsPath = path.join(__dirname, "../packages");
const defaultExtensionsPath = path.join(libPath, "VSCode-linux-x64/resources/app/extensions"); const defaultExtensionsPath = path.join(libPath, "VSCode-linux-x64/resources/app/extensions");
const vscodeVersion = "1.32";
const buildServerBinary = register("build:server:binary", async (runner) => { const buildServerBinary = register("build:server:binary", async (runner) => {
await ensureInstalled(); await ensureInstalled();
@ -219,17 +220,11 @@ const ensureCloned = register("vscode:clone", async (runner) => {
} else { } else {
fse.mkdirpSync(libPath); fse.mkdirpSync(libPath);
runner.cwd = libPath; runner.cwd = libPath;
const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode"]); const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode", "--branch", `release/${vscodeVersion}`, "--single-branch", "--depth=1"]);
if (clone.exitCode !== 0) { if (clone.exitCode !== 0) {
throw new Error(`Failed to clone: ${clone.exitCode}`); throw new Error(`Failed to clone: ${clone.exitCode}`);
} }
} }
runner.cwd = vscodePath;
const checkout = await runner.execute("git", ["checkout", "tags/1.32.0"]);
if (checkout.exitCode !== 0) {
throw new Error(`Failed to checkout: ${checkout.stderr}`);
}
}); });
const ensureClean = register("vscode:clean", async (runner) => { const ensureClean = register("vscode:clean", async (runner) => {