Added variable for composer command path

This commit is contained in:
Mattia Trapani 2016-01-05 10:31:00 +01:00
parent 2cf6b7618f
commit d59b7db85e

View File

@ -22,6 +22,7 @@ set('http_user', null);
env('timezone', 'UTC');
env('branch', ''); // Branch to deploy.
env('env_vars', ''); // For Composer installation. Like SYMFONY_ENV=prod
env('composer_command', 'composer'); // Path to composer
env('composer_options', 'install --no-dev --verbose --prefer-dist --optimize-autoloader --no-progress --no-interaction');
env('git_cache', function () { //whether to use git cache - faster cloning by borrowing objects from existing clones.
$gitVersion = run('git version');
@ -294,9 +295,9 @@ task('deploy:writable', function () {
* Installing vendors tasks.
*/
task('deploy:vendors', function () {
if (commandExist('composer')) {
$composer = 'composer';
} else {
$composer = get('composer_command');
if (! commandExist($composer)) {
run("cd {{release_path}} && curl -sS https://getcomposer.org/installer | php");
$composer = 'php composer.phar';
}