2017-04-30 22:01:12 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
const builder = require('electron-builder').build
|
|
|
|
const vars = require('./vars')
|
|
|
|
|
2019-08-26 20:38:13 +00:00
|
|
|
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
|
2019-08-26 21:52:20 +00:00
|
|
|
const isCI = !!process.env.GITHUB_REF
|
2019-07-04 12:08:47 +00:00
|
|
|
|
2017-04-30 22:01:12 +00:00
|
|
|
builder({
|
2019-07-04 12:08:47 +00:00
|
|
|
dir: true,
|
|
|
|
win: ['nsis', 'portable'],
|
|
|
|
config: {
|
2019-08-26 21:52:20 +00:00
|
|
|
publish: isTag ? [
|
2019-08-26 22:15:49 +00:00
|
|
|
{ provider: 'bintray', 'package': 'terminus' },
|
2019-08-26 21:52:20 +00:00
|
|
|
{ provider: 'github' },
|
|
|
|
] : [
|
2019-08-26 22:15:49 +00:00
|
|
|
{ provider: 'bintray', 'package': 'terminus-nightly' },
|
2019-08-26 21:52:20 +00:00
|
|
|
],
|
2019-07-04 12:08:47 +00:00
|
|
|
extraMetadata: {
|
|
|
|
version: vars.version,
|
|
|
|
},
|
2018-08-09 19:47:38 +00:00
|
|
|
},
|
2019-08-26 21:52:20 +00:00
|
|
|
publish: isCI ? 'always' : 'onTag',
|
2019-06-27 09:47:57 +00:00
|
|
|
}).catch(() => process.exit(1))
|