Skip to content

Commit 270947d

Browse files
committed
build ninja.tar.gz on demand
note that ninja.tar.gz is not needed for dev since the prebuilt one works reasonably well on dev
1 parent 5131563 commit 270947d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

scripts/prebuilt.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var hostPlatform = "darwin";
1414
function rebuild() {
1515
cp.execSync(`node ${path.join(__dirname, "ninja.js")} cleanbuild`, {
1616
cwd: __dirname,
17-
stdio: [0, 1, 2]
17+
stdio: [0, 1, 2],
1818
});
1919
}
2020

@@ -28,7 +28,7 @@ function buildCompiler() {
2828
? `ocamlopt.opt.exe`
2929
: `../native/${ocamlVersion}/bin/ocamlopt.opt`,
3030
INCL: ocamlVersion,
31-
isWin: is_windows
31+
isWin: is_windows,
3232
});
3333

3434
fs.writeFileSync(path.join(root, "lib", prebuilt), content, "ascii");
@@ -52,12 +52,19 @@ if (!is_windows) {
5252
function createOCamlTar() {
5353
if (process.platform === hostPlatform) {
5454
require("./installUtils.js").install();
55+
console.log(`status in ocaml submodule:`)
5556
cp.execSync(`git -C ocaml status -uno`, { cwd: root, stdio: [0, 1, 2] });
5657
cp.execSync(
5758
`git -C ocaml archive --format=tar.gz HEAD -o ../vendor/ocaml.tar.gz`,
5859
{ cwd: root, stdio: [0, 1, 2] }
5960
);
6061
}
62+
console.log(`status in ninja submodule:`)
63+
cp.execSync(`git -C ninja status -uno`, { cwd: root, stdio: [0, 1, 2] });
64+
cp.execSync(
65+
`git -C ninja archive --format=tar.gz HEAD -o ../vendor/ninja.tar.gz`,
66+
{ cwd: root, stdio: [0, 1, 2] }
67+
);
6168
}
6269

6370
createOCamlTar();

0 commit comments

Comments
 (0)