1 --- composer-1.0.0-alpha6/src/Composer/Compiler.php~ 2012-10-23 11:54:25.000000000 +0300
2 +++ composer-1.0.0-alpha6/src/Composer/Compiler.php 2012-12-08 03:44:08.842614626 +0200
7 - $process = new Process('git log --pretty="%h" -n1 HEAD', __DIR__);
8 - if ($process->run() != 0) {
9 - throw new \RuntimeException('Can\'t run git log. You must ensure to run compile from composer git repository clone and that git binary is available.');
11 - $this->version = trim($process->getOutput());
12 + $this->version = getenv('COMPOSER_VERSION');
14 - $process = new Process('git describe --tags HEAD');
15 - if ($process->run() == 0) {
16 - $this->version = trim($process->getOutput());
18 + if (empty($this->version)) {
19 + $process = new Process('git log --pretty="%h" -n1 HEAD', __DIR__);
20 + if ($process->run() != 0) {
21 + throw new \RuntimeException('Can\'t run git log. You must ensure to run compile from composer git repository clone and that git binary is available.');
23 + $this->version = trim($process->getOutput());
25 + $process = new Process('git describe --tags HEAD');
26 + if ($process->run() == 0) {
27 + $this->version = trim($process->getOutput());
31 $phar = new \Phar($pharFile, 0, 'composer.phar');
32 $phar->setSignatureAlgorithm(\Phar::SHA1);