Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #44 from oanhnn/fix-for-custom-bin-feature
Browse files Browse the repository at this point in the history
Fix for custom bin feature
  • Loading branch information
Oanh Nguyen committed Apr 12, 2016
2 parents bdcf49f + d64c9f0 commit 01d1a3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
4 changes: 2 additions & 2 deletions recipes/cachetool.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
run("curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar");
}

run("php cachetool.phar apc:cache:clear system {$options}");
run("{{bin/php}} cachetool.phar apc:cache:clear system {$options}");
})->desc('Clearing APC system cache');

/**
Expand All @@ -46,5 +46,5 @@
run("curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar");
}

run("php cachetool.phar opcache:reset {$options}");
run("{{bin/php}} cachetool.phar opcache:reset {$options}");
})->desc('Clearing OPcode cache');
20 changes: 1 addition & 19 deletions recipes/local.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,11 @@
}
})->desc('Updating code');

/**
* Check if command exist in bash.
*
* @param string $command
* @return bool
*/
function commandExistLocally($command)
{
return runLocally("if hash $command 2>/dev/null; then echo 'true'; fi")->toBool();
}

/**
* Installing vendors tasks.
*/
task('local:vendors', function () {
if (commandExistLocally('composer')) {
$composer = 'composer';
} else {
runLocally("cd {{local_release_path}} && curl -sS https://getcomposer.org/installer | php");
$composer = 'php composer.phar';
}

runLocally("cd {{local_release_path}} && {{env_vars}} $composer {{composer_options}}");
runLocally("cd {{local_release_path}} && {{env_vars}} {{bin/composer}} {{composer_options}}");
})->desc('Installing vendors locally');

/**
Expand Down

0 comments on commit 01d1a3b

Please sign in to comment.