Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Print DEV instead of @package_version@ when used from checkout.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann authored and fabpot committed Nov 28, 2009
1 parent db8cca4 commit 01933aa
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions pirum
Expand Up @@ -92,6 +92,18 @@ class Pirum_CLI
return $ret;
}

public static function version()
{
if (self::VERSION != '@package_version@')
{
return self::VERSION;
}
else
{
return 'DEV';
}
}

protected function runAdd($target)
{
if (!isset($this->options[3]))
Expand All @@ -118,7 +130,7 @@ class Pirum_CLI

protected function getUsage()
{
return $this->formatter->format(sprintf("Pirum %s by Fabien Potencier\n", self::VERSION), 'INFO') .
return $this->formatter->format(sprintf("Pirum %s by Fabien Potencier\n", self::version()), 'INFO') .
$this->formatter->format("Available commands:\n", 'COMMENT') .
" pirum build target_dir\n" .
" pirum add target_dir Pirum-1.0.0.tgz\n\n";
Expand Down Expand Up @@ -306,7 +318,7 @@ EOF
EOF;
}

$version = Pirum_CLI::VERSION;
$version = Pirum_CLI::version();
$index = <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
Expand Down

0 comments on commit 01933aa

Please sign in to comment.