Skip to content

Commit 587f211

Browse files
committed
git fetch first
1 parent 7f2cdf1 commit 587f211

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/prepublish.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ function stat(files) {
5555
map.get(p.dir).add(p.base);
5656
}
5757
}
58-
for (let [k, v] of map) {
59-
console.log(`dir: ${k} \t=>\t ${v.size}`);
60-
}
58+
// for (let [k, v] of map) {
59+
// console.log(`dir: ${k} \t=>\t ${v.size}`);
60+
// }
6161
return map;
6262
}
6363

@@ -71,7 +71,7 @@ function check(map) {
7171

7272
// make sure the remote and current are on the same commit
7373
var currentBranch = (p.execSync(`git branch --show-current`) + "").trim()
74-
var command = `git diff ${currentBranch} origin/${currentBranch}`
74+
var command = `git fetch origin && git diff ${currentBranch} origin/${currentBranch}`
7575
console.log(`Running '${command}'`)
7676
var remoteDiffs = p.execSync(command) + ""
7777
if(remoteDiffs){
@@ -107,9 +107,9 @@ if (!process.argv.includes("-nocheck")) {
107107
check(map);
108108
}
109109

110-
console.log("The diff of artifacts");
110+
111111
var output = p.spawnSync(`git diff jscomp/artifacts.json`, {
112112
cwd: root,
113113
encoding: "utf8"
114114
});
115-
console.log(output.stdout);
115+
console.log("The diff of artifacts",output.stdout);

0 commit comments

Comments
 (0)