diff --git a/deployment.coffee b/deployment.coffee index 7b8fec3..ae80e74 100644 --- a/deployment.coffee +++ b/deployment.coffee @@ -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