Skip to content

Commit 4387fdf

Browse files
赵吉彤kylecarbs
赵吉彤
authored andcommitted
Clone exact vscode release branch when build task (coder#167)
* chore: clone exactly release branch when build * fix: clone params
1 parent 41d1be9 commit 4387fdf

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

build/tasks.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const libPath = path.join(__dirname, "../lib");
1010
const vscodePath = path.join(libPath, "vscode");
1111
const pkgsPath = path.join(__dirname, "../packages");
1212
const defaultExtensionsPath = path.join(libPath, "VSCode-linux-x64/resources/app/extensions");
13+
const vscodeVersion = "1.32";
1314

1415
const buildServerBinary = register("build:server:binary", async (runner) => {
1516
await ensureInstalled();
@@ -219,17 +220,11 @@ const ensureCloned = register("vscode:clone", async (runner) => {
219220
} else {
220221
fse.mkdirpSync(libPath);
221222
runner.cwd = libPath;
222-
const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode"]);
223+
const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode", "--branch", `release/${vscodeVersion}`, "--single-branch", "--depth=1"]);
223224
if (clone.exitCode !== 0) {
224225
throw new Error(`Failed to clone: ${clone.exitCode}`);
225226
}
226227
}
227-
228-
runner.cwd = vscodePath;
229-
const checkout = await runner.execute("git", ["checkout", "tags/1.32.0"]);
230-
if (checkout.exitCode !== 0) {
231-
throw new Error(`Failed to checkout: ${checkout.stderr}`);
232-
}
233228
});
234229

235230
const ensureClean = register("vscode:clean", async (runner) => {

0 commit comments

Comments
 (0)