Command runs
This commit is contained in:
parent
ea4f3445fb
commit
4b5f65b9df
|
@ -68,18 +68,24 @@ class GitProjectVersionning extends ProjectVersionning
|
|||
|
||||
commands
|
||||
|
||||
deploy = (directory, projectVersionning, commands, target, program) ->
|
||||
logExec = (command, options) ->
|
||||
exec = require('sync-exec');
|
||||
|
||||
console.log command
|
||||
exec command, options
|
||||
|
||||
|
||||
deploy = (directory, projectVersionning, commands, target, program) ->
|
||||
commands = projectVersionning.getUpdateCommands().concat(commands)
|
||||
|
||||
for command in commands
|
||||
exec command, {cwd: directory}
|
||||
logExec command , {cwd: directory}
|
||||
|
||||
exec buildDeployCommand(directory, program, target), {cwd: directory}
|
||||
logExec buildDeployCommand(directory, program, target), {cwd: directory}
|
||||
|
||||
buildDeployCommand = (directory, program, target) ->
|
||||
if program == 'mage'
|
||||
command = 'mage deploy to:' + target
|
||||
command = 'vendor/bin/mage deploy to:' + target
|
||||
else
|
||||
interpreter = null
|
||||
|
||||
|
@ -118,5 +124,6 @@ cleanCommands = (commands) ->
|
|||
elements = elements.splice 1
|
||||
args = elements.join(":")
|
||||
results.push interpreters[interpreter] + " " + args
|
||||
|
||||
else
|
||||
results.push command
|
||||
results
|
||||
|
|
Loading…
Reference in a new issue