Skip to content

Commit

Permalink
Added commit sha in phar version
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Nov 20, 2014
1 parent 80f502d commit 16e8146
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Cli/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ public function getApi()
return $this->api;
}

public function getLongVersion()
{
$version = parent::getLongVersion().' by <comment>SensioLabs</comment>';
$commit = '@git-commit@';

if ('@'.'git-commit@' !== $commit) {
$version .= ' ('.substr($commit, 0, 7).')';
}

return $version;
}

protected function getDefaultHelperSet()
{
$helperSet = parent::getDefaultHelperSet();
Expand Down
1 change: 1 addition & 0 deletions box.json.dist → box.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"output": "build/insight.phar",
"stub": true,
"directories": ["."],
"git-commit": "git-commit",
"map": [
{ "Cli": "SensioLabs/Insight/Cli" },
{ "Sdk": "SensioLabs/Insight/Sdk" }
Expand Down

0 comments on commit 16e8146

Please sign in to comment.