2017-05-01 14:01:14 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
const builder = require('electron-builder').build
|
|
|
|
const vars = require('./vars')
|
|
|
|
|
2019-08-15 13:17:15 +00:00
|
|
|
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
|
2019-07-04 12:08:47 +00:00
|
|
|
|
2020-12-24 17:18:07 +00:00
|
|
|
process.env.ARCH = process.env.ARCH || process.arch
|
|
|
|
|
2017-05-01 14:01:14 +00:00
|
|
|
builder({
|
2019-07-04 12:08:47 +00:00
|
|
|
dir: true,
|
2020-05-07 11:00:42 +00:00
|
|
|
mac: ['pkg', 'zip'],
|
2020-12-24 17:18:07 +00:00
|
|
|
arm64: process.env.ARCH === 'arm64',
|
2019-07-04 12:08:47 +00:00
|
|
|
config: {
|
|
|
|
extraMetadata: {
|
|
|
|
version: vars.version,
|
|
|
|
},
|
2021-01-26 23:26:48 +00:00
|
|
|
npmRebuild: process.env.ARCH !== 'arm64',
|
2018-08-09 19:47:38 +00:00
|
|
|
},
|
2019-08-27 08:33:30 +00:00
|
|
|
publish: isTag ? 'always' : 'onTag',
|
2020-05-07 15:37:39 +00:00
|
|
|
}).catch(e => {
|
|
|
|
console.error(e)
|
|
|
|
process.exit(1)
|
|
|
|
})
|