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