2017-05-01 01:01:12 +03:00
|
|
|
#!/usr/bin/env node
|
|
|
|
const builder = require('electron-builder').build
|
|
|
|
const vars = require('./vars')
|
|
|
|
|
2019-08-27 11:33:30 +03:00
|
|
|
const isTag = (process.env.GITHUB_REF || process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/')
|
2019-08-27 00:52:20 +03:00
|
|
|
const isCI = !!process.env.GITHUB_REF
|
2019-07-04 15:08:47 +03:00
|
|
|
|
2022-03-09 08:49:04 +03:00
|
|
|
process.env.ARCH = process.env.ARCH || process.arch
|
|
|
|
|
2017-05-01 01:01:12 +03:00
|
|
|
builder({
|
2019-07-04 15:08:47 +03:00
|
|
|
dir: true,
|
2020-02-12 20:48:18 +03:00
|
|
|
win: ['nsis', 'zip'],
|
2022-03-09 08:49:04 +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',
|
2019-06-27 12:47:57 +03:00
|
|
|
}).catch(() => process.exit(1))
|