forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.js
executable file
·35 lines (29 loc) · 962 Bytes
/
release.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env node
//@ts-check
var path = require('path')
var fs = require('fs')
var cp = require('child_process')
var root = path.join(__dirname,'..')
var libJsDir = path.join(root,'lib','js')
var jscompDir = path.join(root,'jscomp')
function run() {
for (let file of fs.readdirSync(libJsDir)) {
if (file.endsWith('.js')) {
fs.unlinkSync(path.join(libJsDir, file))
}
}
cp.execSync(`make clean`,
{ cwd: jscompDir, encoding: 'utf8', stdio: [0, 1, 2] })
cp.execSync(`make themes`,
{ cwd: jscompDir, encoding: 'utf8', stdio: [0, 1, 2] })
cp.execSync(`make -j9 check`,
{ cwd: jscompDir, encoding: 'utf8', stdio: [0, 1, 2] })
cp.execSync(`BS_DEBUG=false make -j9 force-snapshotml`,
{ cwd: jscompDir, encoding: 'utf8', stdio: [0, 1, 2] })
cp.execSync(`make -j9 world`,
{ cwd: root, stdio: [0, 1, 2] })
}
if(require.main === module){
run()
}
exports.run = run