2017-05-01 01:01:12 +03:00
|
|
|
#!/usr/bin/env node
|
|
|
|
const rebuild = require('electron-rebuild').default
|
|
|
|
const path = require('path')
|
|
|
|
const vars = require('./vars')
|
|
|
|
|
2018-08-09 21:53:22 +03:00
|
|
|
lifecycles = []
|
2019-05-17 23:05:53 +03:00
|
|
|
for (let dir of ['app', 'terminus-core', 'terminus-ssh', 'terminus-terminal']) {
|
2019-06-27 12:47:57 +03:00
|
|
|
build = rebuild({
|
2018-12-15 17:49:06 +03:00
|
|
|
buildPath: path.resolve(__dirname, '../' + dir),
|
|
|
|
electronVersion: vars.electronVersion,
|
|
|
|
force: true,
|
2019-06-27 12:47:57 +03:00
|
|
|
})
|
|
|
|
build.catch(() => process.exit(1))
|
|
|
|
lifecycles.push([build.lifecycle, dir])
|
2018-12-15 17:49:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
console.info('Building against Electron', vars.electronVersion)
|
2018-08-09 21:53:22 +03:00
|
|
|
|
2018-12-15 17:49:06 +03:00
|
|
|
for (let [lc, dir] of lifecycles) {
|
2018-08-09 21:53:22 +03:00
|
|
|
lc.on('module-found', name => {
|
2018-12-15 17:49:06 +03:00
|
|
|
console.info('Rebuilding', dir + '/' + name)
|
2018-08-09 21:53:22 +03:00
|
|
|
})
|
|
|
|
}
|