Skip to content

Commit 6a02724

Browse files
committed
Remove release.sh
1 parent 7aeb473 commit 6a02724

File tree

4 files changed

+38
-17
lines changed

4 files changed

+38
-17
lines changed

jscomp/release.sh

-14
This file was deleted.

jscomp/repl.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function prepare() {
3333

3434
e(`hash camlp4 2>/dev/null || { echo >&2 "camlp4 not installed. Please install: opam install camlp4"; exit 1; }`)
3535

36-
e(`./release.sh`)
36+
require('../scripts/release').run()
3737

3838
try {
3939
fs.unlinkSync(path.join(__dirname, 'bin', 'js_compiler.ml'))
@@ -124,6 +124,6 @@ e(`js_of_ocaml --disable share --toplevel +weak.js ./polyfill.js jsc.byte ${incl
124124

125125

126126

127-
// note it is preferred to run ./release.sh && ./js.sh otherwise amdjs is not really latest
127+
128128

129129

scripts/prepublish.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function verifyIsCleanWorkTree() {
2424
}
2525
}
2626
clean()
27-
p.execSync(`./release.sh`, { cwd: path.join(root, 'jscomp'), stdio: 'inherit' })
27+
require('./release').run()
2828
verifyIsCleanWorkTree()
2929

3030
clean()

scripts/release.js

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env node
2+
//@ts-check
3+
4+
var path = require('path')
5+
var fs = require('fs')
6+
var cp = require('child_process')
7+
var root = path.join(__dirname,'..')
8+
var libJsDir = path.join(root,'lib','js')
9+
var jscompDir = path.join(root,'jscomp')
10+
function run() {
11+
12+
13+
for (let file of fs.readdirSync(libJsDir)) {
14+
if (file.endsWith('.js')) {
15+
fs.unlinkSync(path.join(libJsDir, file))
16+
}
17+
}
18+
19+
20+
cp.execSync(`make clean`,
21+
{ cwd: jscompDir, encoding: 'utf8', stdio: [0, 1, 2] })
22+
cp.execSync(`make themes`,
23+
{ cwd: jscompDir, encoding: 'utf8', stdio: [0, 1, 2] })
24+
cp.execSync(`make -j9 check`,
25+
{ cwd: jscompDir, encoding: 'utf8', stdio: [0, 1, 2] })
26+
cp.execSync(`BS_DEBUG=false make -j9 force-snapshotml`,
27+
{ cwd: jscompDir, encoding: 'utf8', stdio: [0, 1, 2] })
28+
cp.execSync(`make -j9 world`,
29+
{ cwd: root, stdio: [0, 1, 2] })
30+
31+
}
32+
if(require.main === module){
33+
run()
34+
}
35+
exports.run = run

0 commit comments

Comments
 (0)