Skip to content

Commit 835641b

Browse files
committed
fix prepublish process
1 parent 179012e commit 835641b

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
*.ninja_deps
1111
*.ninja_log
1212
*~
13+
# darwin/bsc this does not work because bin
14+
# has a file happens to be named after it
15+
# npmignore is completely broken
1316
docs/*
1417
docs/docson/*
1518
!docs/docson/build-schema.json
@@ -32,4 +35,3 @@ vendor/cppo
3235
vendor/rollup.js
3336
package/
3437
*.tgz
35-
darwin/bsc

scripts/prepublish.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ var output = p.spawnSync(`npm pack --dry-run`, {
1313
// stdio: [0, 1, 2]
1414
});
1515

16+
try {
17+
// npmignore is broken let's do it
18+
let file = path.join(root, process.platform, "bsc")
19+
console.log(`try removing ${file}`)
20+
fs.unlinkSync(file);
21+
} catch (e) {}
22+
1623
/**
1724
*
1825
* @param {string} output
@@ -60,9 +67,10 @@ function stat(files) {
6067
* @param {Map<string, Set<string> >} map
6168
*/
6269
function check(map) {
63-
var compilers = ["bsb", "bsb_helper", "bsc", "ninja", "refmt"];
70+
var compilers = ["bsb", "bsb_helper", "bsc", "ninja", "refmt"];
6471
for (let os of ["win32", "darwin", "linux"]) {
6572
for (let c of compilers) {
73+
assert(map.get(os));
6674
assert(map.get(os).has(`${c}.exe`));
6775
}
6876
}
@@ -96,3 +104,7 @@ fs.writeFileSync(
96104
if (!process.argv.includes("-nocheck")) {
97105
check(map);
98106
}
107+
108+
console.log("The diff of artifacts")
109+
var output = p.spawnSync(`git diff jscomp/artifacts.json`,{cwd:root,encoding:'utf8'})
110+
console.log(output.stdout)

0 commit comments

Comments
 (0)