Comparing version 0.4.1 to 0.4.2
@@ -46,3 +46,3 @@ { | ||
"name": "applesign", | ||
"version": "0.4.1" | ||
"version": "0.4.2" | ||
} |
@@ -244,12 +244,12 @@ 'use strict'; | ||
signLibraries (path, next) { | ||
let signs = 0; | ||
let errors = 0; | ||
let found = false; | ||
this.emit('message', 'Signing libraries and frameworks'); | ||
const libraries = []; | ||
const exe = '/' + getExecutable(this.config.appdir); | ||
let found = false; | ||
walk.walkSync(path, (basedir, filename, stat) => { | ||
const file = [ basedir, filename ].join('/'); | ||
if (file.endsWith(exe)) { | ||
this.emit('message', 'Executable found at '+file); | ||
found = true; | ||
@@ -266,19 +266,3 @@ return; | ||
if (isMacho(buffer)) { | ||
found = true; | ||
signs++; | ||
this.signFile(file, (err) => { | ||
signs--; | ||
if (err) { | ||
this.emit('error ', err); | ||
errors++; | ||
} | ||
if (signs === 0) { | ||
if (errors > 0) { | ||
this.emit('message', 'Warning: Some (' + errors + ') errors happened.'); | ||
} else { | ||
this.emit('message', 'Everything seems signed now'); | ||
} | ||
next(); | ||
} | ||
}); | ||
libraries.push(file); | ||
} | ||
@@ -294,2 +278,28 @@ fs.close(fd); | ||
} | ||
if (libraries.length > 0) { | ||
let issues = 0; | ||
let signs = 0; | ||
this.emit('message', 'Found ' + libraries.length + ' libraries'); | ||
libraries.forEach((lib) => { | ||
signs++; | ||
this.signFile(lib, (err) => { | ||
signs--; | ||
if (err) { | ||
this.emit('warning', err); | ||
issues++; | ||
} | ||
if (signs === 0) { | ||
if (issues > 0) { | ||
this.emit('message', 'Warning: Some (' + issues + ') errors happened.'); | ||
} else { | ||
this.emit('message', 'Everything seems signed now'); | ||
} | ||
next(); | ||
} | ||
}); | ||
}); | ||
} else { | ||
this.emit('message', 'No libraries found, moving along'); | ||
next(); | ||
} | ||
} | ||
@@ -296,0 +306,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21083
542