Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const assert = require('assert');
const childProcess = require('child_process');
const electronPackager = require('electron-packager');
const fs = require('fs-extra');
const hostArch = require('electron-packager/targets').hostArch;
const includePathInPackagedApp = require('./include-path-in-packaged-app');
const getLicenseText = require('./get-license-text');
const path = require('path');
const spawnSync = require('./spawn-sync');
const template = require('lodash.template');
const CONFIG = require('../config');
const HOST_ARCH = hostArch();
module.exports = function() {
const appName = getAppName();
console.log(
`Running electron-packager on ${
CONFIG.intermediateAppPath
} with app name "${appName}"`
);
return runPackager({
appBundleId: 'com.github.atom',
appCopyright: `Copyright © 2014-${new Date().getFullYear()} GitHub, Inc. All rights reserved.`,
appVersion: CONFIG.appMetadata.version,
arch: process.platform === 'darwin' ? 'x64' : HOST_ARCH, // OS X is 64-bit only
asar: { unpack: buildAsarUnpackGlobExpression() },
buildVersion: CONFIG.appMetadata.version,
derefSymlinks: false,