tabby/scripts/build-macos.js

22 lines
496 B
JavaScript
Raw Normal View History

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