Skip to content

Commit

Permalink
Merge pull request #86 from sky-uk/master
Browse files Browse the repository at this point in the history
Added 'scripts' as an optional paramter
  • Loading branch information
sethlu committed Oct 7, 2016
2 parents 6bae78e + 15dbdc1 commit b1644aa
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 b1644aa

Please sign in to comment.