Skip to content

Commit

Permalink
Added 'scripts' as an optional paramter
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam committed Oct 6, 2016
1 parent 6bae78e commit 0fd220e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/electron-osx-flat-usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ install Path to install for the bundle. Default `/Applications`.
keychain The keychain name. Default to system default keychain.
platform Build platform of Electron. Allowed values: darwin, mas. Default to auto detect from application package.
pkg Path to the output package.
scripts Path to a directory containing pre and/or post install scripts.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ function flatApplicationAsync (opts) {
if (opts.keychain) {
args.unshift('--keychain', opts.keychain)
}
if (opts.scripts) {
args.unshift('--scripts', opts.scripts)
}

debuglog('Flattening... ' + opts.app)
return execFileAsync('productbuild', args)
Expand Down Expand Up @@ -616,6 +619,7 @@ function flatAsync (opts) {
debuglog('> package-output ' + opts.pkg)
debuglog('> install-path ' + opts.install)
debuglog('> identity ' + opts.identity)
debuglog('> scripts ', opts.scripts)
return flatApplicationAsync(opts)
})
.then(function () {
Expand Down

0 comments on commit 0fd220e

Please sign in to comment.