mirror of https://github.com/msgbyte/tailchat
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			31 lines
		
	
	
		
			851 B
		
	
	
	
		
			JavaScript
		
	
			
		
		
	
	
			31 lines
		
	
	
		
			851 B
		
	
	
	
		
			JavaScript
		
	
const { notarize } = require('electron-notarize');
 | 
						|
const { build } = require('../../package.json');
 | 
						|
 | 
						|
exports.default = async function notarizeMacos(context) {
 | 
						|
  const { electronPlatformName, appOutDir } = context;
 | 
						|
  if (electronPlatformName !== 'darwin') {
 | 
						|
    return;
 | 
						|
  }
 | 
						|
 | 
						|
  if (process.env.CI !== 'true') {
 | 
						|
    console.warn('Skipping notarizing step. Packaging is not running in CI');
 | 
						|
    return;
 | 
						|
  }
 | 
						|
 | 
						|
  if (!('APPLE_ID' in process.env && 'APPLE_ID_PASS' in process.env)) {
 | 
						|
    console.warn(
 | 
						|
      'Skipping notarizing step. APPLE_ID and APPLE_ID_PASS env variables must be set'
 | 
						|
    );
 | 
						|
    return;
 | 
						|
  }
 | 
						|
 | 
						|
  const appName = context.packager.appInfo.productFilename;
 | 
						|
 | 
						|
  await notarize({
 | 
						|
    appBundleId: build.appId,
 | 
						|
    appPath: `${appOutDir}/${appName}.app`,
 | 
						|
    appleId: process.env.APPLE_ID,
 | 
						|
    appleIdPassword: process.env.APPLE_ID_PASS,
 | 
						|
  });
 | 
						|
};
 |