]>
Commit | Line | Data |
---|---|---|
7e4a1874 ER |
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 | |
3 | @@ -35,16 +35,20 @@ | |
4 | unlink($pharFile); | |
5 | } | |
6 | ||
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.'); | |
10 | - } | |
11 | - $this->version = trim($process->getOutput()); | |
12 | + $this->version = getenv('COMPOSER_VERSION'); | |
13 | ||
14 | - $process = new Process('git describe --tags HEAD'); | |
15 | - if ($process->run() == 0) { | |
16 | - $this->version = trim($process->getOutput()); | |
17 | - } | |
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.'); | |
22 | + } | |
23 | + $this->version = trim($process->getOutput()); | |
24 | + | |
25 | + $process = new Process('git describe --tags HEAD'); | |
26 | + if ($process->run() == 0) { | |
27 | + $this->version = trim($process->getOutput()); | |
28 | + } | |
29 | + } | |
30 | ||
31 | $phar = new \Phar($pharFile, 0, 'composer.phar'); | |
32 | $phar->setSignatureAlgorithm(\Phar::SHA1); |