tabby/build/mac/afterBuildHook.cjs
Eugene Pankov 324ca6ed82
wip
2023-02-26 18:04:40 +01:00

17 lines
498 B
JavaScript

const fs = require('fs')
const signHook = require('./afterSignHook.cjs')
module.exports = async function (params) {
// notarize the app on Mac OS only.
if (process.platform !== 'darwin' || !process.env.GITHUB_REF || !process.env.GITHUB_REF.startsWith('refs/tags/')) {
return
}
console.log('afterBuild hook triggered')
let pkgName = fs.readdirSync('dist').find(x => x.endsWith('.pkg'))
signHook({
appOutDir: 'dist',
_pathOverride: pkgName,
})
}