Skip to content

Commit

Permalink
Pin docc render build to specific sha
Browse files Browse the repository at this point in the history
  • Loading branch information
award999 committed Dec 12, 2024
1 parent b285c51 commit 0008f46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/update_swift_docc_render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
/* eslint-disable no-console */

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";
Expand All @@ -38,8 +39,10 @@ async function cloneSwiftDocCRender(buildDirectory: string): Promise<string> {
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"), {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0008f46

Please sign in to comment.