remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/apps/remixdesktop/afterbuild.js

29 lines
748 B

const { spawn } = require('child_process');
exports.default = async function afterbuild(context) {
// do not run when not on macOS
if (process.platform !== 'darwin') {
return;
}
console.log('AFTER BUILD', context);
const artifactPaths = context.artifactPaths
const dmgs = artifactPaths.filter((dmg) => dmg.endsWith('.dmg')).map((dmg) => `'${dmg}'`)
console.log(['notarize.sh', ...dmgs]);
const child = spawn('zsh', ['notarize.sh', ...dmgs], { shell: true });
child.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
child.stderr.on('data', (data) => {
console.error(`stderr: ${data}`);
});
child.on('close', (code) => {
console.log(`child process exited with code ${code}`);
});
}