Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dp-ifacesoft committed Mar 20, 2015
1 parent 11b1c63 commit 46463b9
Show file tree
Hide file tree
Showing 6 changed files with 1,404 additions and 10,527 deletions.
14 changes: 10 additions & 4 deletions Source/Ice/Action/Composer/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Ice\Core\Action;
use Ice\Core\Logger;
use Ice\Core\Module;
use Ice\Helper\Console;

/**
Expand Down Expand Up @@ -70,7 +71,11 @@ class Composer_Update extends Action
protected static function config()
{
return [
'view' => ['template' => '']
'view' => ['template' => ''],
'input' => [
'vendor' => ['default' => 'ifacesoft/composer'],
'command' => ['default' => '/bin/composer']
]
];
}

Expand All @@ -87,11 +92,12 @@ protected static function config()
*/
public function run(array $input)
{
$command = VENDOR_DIR . $input['vendor'] . $input['command'];

Console::run([
'cd ' . MODULE_DIR,
'php composer.phar self-update',
'php composer.phar clear-cache',
'php composer.phar update --prefer-source'
'php ' . $command . ' clear-cache',
'php ' . $command . ' update --prefer-source'
]);
}
}
4 changes: 2 additions & 2 deletions Source/Ice/Helper/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ public static function run($commands, $toDevNull = false)
$commandString = '';

foreach ((array)$commands as $command) {
$commandString .= $command . ' && ';
$commandString .= $command . ' && \\' . "\n";
}

$commandString = substr($commandString, 0, -4);
$commandString = substr($commandString, 0, -5);

if ($toDevNull) {
$commandString .= ' > /dev/null 2>&1';
Expand Down
Loading

0 comments on commit 46463b9

Please sign in to comment.