2017-05-01 14:35:26 +03:00
|
|
|
#!/usr/bin/env node
|
2022-06-02 21:15:30 +03:00
|
|
|
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
|
2017-05-01 14:35:26 +03:00
|
|
|
const builder = require('electron-builder').build
|
|
|
|
const vars = require('./vars')
|
|
|
|
|
2019-08-26 23:38:13 +03:00
|
|
|
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
|
2019-07-04 15:08:47 +03:00
|
|
|
|
2022-06-02 21:15:30 +03:00
|
|
|
process.env.ARCH = (process.env.ARCH || process.arch) === 'arm' ? 'armv7l' : process.env.ARCH || process.arch
|
2022-03-09 08:05:37 +03:00
|
|
|
|
2017-05-01 14:35:26 +03:00
|
|
|
builder({
|
2019-07-04 15:08:47 +03:00
|
|
|
dir: true,
|
2021-05-02 21:02:46 +03:00
|
|
|
linux: ['deb', 'tar.gz', 'rpm', 'pacman'],
|
2022-04-25 08:49:30 +03:00
|
|
|
armv7l: process.env.ARCH === 'armv7l',
|
2022-03-09 08:05:37 +03:00
|
|
|
arm64: process.env.ARCH === 'arm64',
|
2019-07-04 15:08:47 +03:00
|
|
|
config: {
|
|
|
|
extraMetadata: {
|
|
|
|
version: vars.version,
|
|
|
|
},
|
2022-06-02 21:15:30 +03:00
|
|
|
publish: {
|
|
|
|
provider: 'github',
|
|
|
|
channel: `latest-${process.arch}`,
|
|
|
|
},
|
2018-08-09 22:47:38 +03:00
|
|
|
},
|
2022-06-02 21:15:30 +03:00
|
|
|
publish: isTag ? 'always' : 'onTagOrDraft',
|
2019-06-27 12:47:57 +03:00
|
|
|
}).catch(() => process.exit(1))
|