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