tabby/scripts/build-native.js

28 lines
773 B
JavaScript
Raw Normal View History

2017-04-30 22:01:12 +00:00
#!/usr/bin/env node
const rebuild = require('electron-rebuild').default
const path = require('path')
const vars = require('./vars')
2019-08-27 09:52:52 +00:00
let lifecycles = []
2021-06-29 21:57:04 +00:00
for (let dir of ['app', 'tabby-core', 'tabby-local', 'tabby-ssh', 'tabby-terminal']) {
2019-08-27 09:52:52 +00:00
const build = rebuild({
buildPath: path.resolve(__dirname, '../' + dir),
electronVersion: vars.electronVersion,
2020-12-24 13:03:14 +00:00
arch: process.env.ARCH ?? process.arch,
2019-08-27 09:52:52 +00:00
force: true,
})
build.catch(e => {
console.error(e)
process.exit(1)
})
lifecycles.push([build.lifecycle, dir])
2018-12-15 14:49:06 +00:00
}
console.info('Building against Electron', vars.electronVersion)
2018-08-09 18:53:22 +00:00
2018-12-15 14:49:06 +00:00
for (let [lc, dir] of lifecycles) {
2019-08-27 09:52:52 +00:00
lc.on('module-found', name => {
console.info('Rebuilding', dir + '/' + name)
})
2018-08-09 18:53:22 +00:00
}