diff --git a/scripts/update_swift_docc_render.ts b/scripts/update_swift_docc_render.ts index 2643affd..4e474db3 100644 --- a/scripts/update_swift_docc_render.ts +++ b/scripts/update_swift_docc_render.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ //===----------------------------------------------------------------------===// // // This source file is part of the VS Code Swift open source project @@ -12,7 +13,7 @@ // //===----------------------------------------------------------------------===// -import simpleGit from "simple-git"; +import simpleGit, { ResetMode } from "simple-git"; import { spawn } from "child_process"; import { stat, mkdtemp, mkdir, rm, readdir } from "fs/promises"; import * as path from "path"; @@ -38,8 +39,10 @@ async function cloneSwiftDocCRender(buildDirectory: string): Promise { const swiftDocCRenderDirectory = path.join(buildDirectory, "swift-docc-render"); const git = simpleGit({ baseDir: buildDirectory }); console.log("> git clone https://github.com/swiftlang/swift-docc-render.git"); + const revision = "10b097153d89d7bfc2dd400b47181a782a0cfaa0"; await git.clone("https://github.com/swiftlang/swift-docc-render.git", swiftDocCRenderDirectory); await git.cwd(swiftDocCRenderDirectory); + await git.reset(ResetMode.HARD, [revision]); // Apply our patches to swift-docc-render const patches = ( await readdir(path.join(__dirname, "patches", "swift-docc-render"), { @@ -85,7 +88,7 @@ async function exec( if (process.argv.includes("postinstall")) { try { await stat(outputDirectory); - console.log(`${outputDirectory} exists, skipping build.`) + console.log(`${outputDirectory} exists, skipping build.`); return; } catch { // Proceed with creating