diff --git a/Cli/Application.php b/Cli/Application.php index 886a026..643edcc 100644 --- a/Cli/Application.php +++ b/Cli/Application.php @@ -65,6 +65,18 @@ public function getApi() return $this->api; } + public function getLongVersion() + { + $version = parent::getLongVersion().' by SensioLabs'; + $commit = '@git-commit@'; + + if ('@'.'git-commit@' !== $commit) { + $version .= ' ('.substr($commit, 0, 7).')'; + } + + return $version; + } + protected function getDefaultHelperSet() { $helperSet = parent::getDefaultHelperSet(); diff --git a/box.json.dist b/box.json similarity index 88% rename from box.json.dist rename to box.json index 2276fe2..942b991 100644 --- a/box.json.dist +++ b/box.json @@ -4,6 +4,7 @@ "output": "build/insight.phar", "stub": true, "directories": ["."], + "git-commit": "git-commit", "map": [ { "Cli": "SensioLabs/Insight/Cli" }, { "Sdk": "SensioLabs/Insight/Sdk" }