Add COMPOSER_ROOT_VERSION env var to override the root version
parent
0930abd67e
commit
5498b8d6a0
|
@ -189,6 +189,11 @@ For example:
|
||||||
|
|
||||||
$ COMPOSER=composer-other.json php composer.phar install
|
$ 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
|
### COMPOSER_VENDOR_DIR
|
||||||
|
|
||||||
By setting this var you can make composer install the dependencies into a
|
By setting this var you can make composer install the dependencies into a
|
||||||
|
|
|
@ -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;
|
$config['version'] = $version;
|
||||||
} else {
|
} else {
|
||||||
$version = $config['version'];
|
$version = $config['version'];
|
||||||
|
|
Loading…
Reference in New Issue