Skip to content

Commit 02a1e7f

Browse files
committed
cherry pick changes from 8.4
1 parent 58f4cd1 commit 02a1e7f

File tree

6 files changed

+6
-4
lines changed

6 files changed

+6
-4
lines changed

darwin/ninja.exe

0 Bytes
Binary file not shown.

linux/ninja.exe

0 Bytes
Binary file not shown.

scripts/buckle_lto.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var regexp = RegExp(
2727
}
2828
return result;
2929
})
30-
.flat()
30+
.reduce((x,y)=>x.concat(y))
3131
.join("|")}`,
3232
"g"
3333
);

scripts/prebuilt.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ var root_config = { cwd: root, stdio: [0, 1, 2], encoding: "utf8" };
99

1010
var ocamlVersion = require("./buildocaml.js").getVersionPrefix();
1111
var fs = require("fs");
12-
var hostPlatform = "darwin";
1312

13+
function isHostPlatform(){
14+
return process.platform === "darwin" || process.platform === "linux"
15+
}
1416
function rebuild() {
1517
cp.execSync(`node ${path.join(__dirname, "ninja.js")} cleanbuild`, {
1618
cwd: __dirname,
@@ -51,7 +53,7 @@ if (!is_windows) {
5153
}
5254

5355
function createOCamlTar() {
54-
if (process.platform === hostPlatform) {
56+
if (isHostPlatform()) {
5557
require("./installUtils.js").install();
5658
console.log(`status in ocaml submodule:`);
5759
cp.execSync(`git -C ocaml status -uno`, { cwd: root, stdio: [0, 1, 2] });

scripts/prepublish.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function check(map) {
6464
// since it's already snapshot
6565

6666
// make sure the remote and current are on the same commit
67-
var currentBranch = (p.execSync(`git branch --show-current`) + "").trim();
67+
var currentBranch = (p.execSync(`git rev-parse --abbrev-ref HEAD`) + "").trim();
6868
var command = `git fetch origin && git diff ${currentBranch} origin/${currentBranch}`;
6969
console.log(`Running '${command}'`);
7070
var remoteDiffs = p.execSync(command) + "";

win32/ninja.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)