MCPcopy
hub / github.com/henryboldi/felony / pack

Function pack

package.js:100–134  ·  view source on GitHub ↗
(plat, arch, cb)

Source from the content-addressed store, hash-verified

98}
99
100function pack(plat, arch, cb) {
101 // there is no darwin ia32 electron
102 if (plat === 'darwin' && arch === 'ia32') return
103
104 const iconObj = {
105 icon: DEFAULT_OPTS.icon + (() => {
106 let extension = '.png'
107 if (plat === 'darwin') {
108 extension = '.icns'
109 } else if (plat === 'win32') {
110 extension = '.ico'
111 }
112 return extension
113 })(),
114 }
115
116 const opts = Object.assign({}, DEFAULT_OPTS, iconObj, {
117 'platform': plat,
118 arch,
119 'prune': true,
120 'app-version': pkg.version || DEFAULT_OPTS.version,
121 'out': `release/${ plat }-${ arch }`,
122 })
123
124 if (`${ plat }-${ arch }` === 'darwin-x64') {
125 opts['osx-sign'] = {
126 app: '/release/darwin-x64/Felony-darwin-x64/Felony.app',
127 identity: 'xxxxxxxxx', // Developer ID Application: * (*)
128 }
129 }
130
131 console.log('opts', opts)
132
133 packager(opts, cb)
134}
135
136function log(plat, arch) {
137 return (err, filepath) => {

Callers 1

startPackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected