From bc4e06424e5ee73db72d02ee2140fa45b1d2cf86 Mon Sep 17 00:00:00 2001 From: Beau Simensen Date: Sun, 4 Mar 2012 10:03:54 -0800 Subject: [PATCH] Use tag as package version if built off of a tag --- src/Composer/Compiler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Composer/Compiler.php b/src/Composer/Compiler.php index c21b66248..9d2eeeff8 100644 --- a/src/Composer/Compiler.php +++ b/src/Composer/Compiler.php @@ -41,6 +41,11 @@ class Compiler } $this->version = trim($process->getOutput()); + $process = new Process('git describe --tags HEAD'); + if ($process->run() == 0) { + $this->version = trim($process->getOutput()); + } + $phar = new \Phar($pharFile, 0, 'composer.phar'); $phar->setSignatureAlgorithm(\Phar::SHA1);