Skip to content

Commit

Permalink
feature #46 Added commit sha in phar version (lyrixx)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.1.x-dev branch.

Discussion
----------

Added commit sha in phar version

Commits
-------

16e8146 Added commit sha in phar version
  • Loading branch information
lyrixx committed Nov 20, 2014
2 parents 80f502d + 16e8146 commit f1e8059
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 f1e8059

Please sign in to comment.