1
0
Fork 0

Add COMPOSER_ROOT_VERSION env var to override the root version

pull/727/merge
Jordi Boggiano 2012-05-24 20:36:47 +02:00
parent 0930abd67e
commit 5498b8d6a0
2 changed files with 10 additions and 0 deletions

View File

@ -189,6 +189,11 @@ For example:
$ COMPOSER=composer-other.json php composer.phar install
### COMPOSER_ROOT_VERSION
By setting this var you can specify the version of the root package, if it can
not be guessed from VCS info and is not present in `composer.json`.
### COMPOSER_VENDOR_DIR
By setting this var you can make composer install the dependencies into a

View File

@ -53,6 +53,11 @@ class RootPackageLoader extends ArrayLoader
}
}
// override with env var if available
if (getenv('COMPOSER_ROOT_VERSION')) {
$version = getenv('COMPOSER_ROOT_VERSION');
}
$config['version'] = $version;
} else {
$version = $config['version'];