mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Use spawn to run fpm
This commit is contained in:
parent
e6d5800f1b
commit
7141afc413
1 changed files with 8 additions and 11 deletions
|
@ -307,18 +307,18 @@ module.exports = (grunt) ->
|
|||
|
||||
buildDeb: (callback = (error) ->) ->
|
||||
# TODO: filestore uses local 'uploads' directory, not configurable in settings
|
||||
command = ["fpm", "-s", "dir", "-t", "deb", "-n", "sharelatex", "-v", "0.0.1", "--verbose"]
|
||||
command = ["-s", "dir", "-t", "deb", "-n", "sharelatex", "-v", "0.0.1", "--verbose"]
|
||||
command.push(
|
||||
"--maintainer", "'ShareLaTeX <team@sharelatex.com>'"
|
||||
"--maintainer", "ShareLaTeX <team@sharelatex.com>"
|
||||
"--config-files", "/etc/sharelatex/settings.coffee",
|
||||
"--directories", "/var/data/sharelatex"
|
||||
"--directories", "/var/log/sharelatex"
|
||||
)
|
||||
|
||||
command.push(
|
||||
"--depends", "'redis-server > 2.6.12'"
|
||||
"--depends", "'mongodb-10gen > 2.4.0'"
|
||||
"--depends", "'nodejs > 0.10.0'"
|
||||
"--depends", "redis-server > 2.6.12"
|
||||
"--depends", "mongodb-10gen > 2.4.0"
|
||||
"--depends", "nodejs > 0.10.0"
|
||||
)
|
||||
|
||||
template = fs.readFileSync("package/upstart/sharelatex-template").toString()
|
||||
|
@ -359,12 +359,9 @@ module.exports = (grunt) ->
|
|||
command.push(
|
||||
"package/config/settings.coffee=/etc/sharelatex/settings.coffee"
|
||||
)
|
||||
console.log command.join(" ")
|
||||
exec command.join(" "), (error, stdout, stderr) ->
|
||||
return callback(error) if error?
|
||||
console.log stdout
|
||||
console.error stderr if stderr?
|
||||
callback()
|
||||
console.log "fpm " + command.join(" ")
|
||||
proc = spawn "fpm", command, stdio: "inherit"
|
||||
proc.on "close", callback
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue