Skip to content

Commit

Permalink
Update UpdateVersionCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
WaveHack committed Jan 24, 2017
1 parent ef766d6 commit 0fa4140
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Console/Commands/UpdateVersionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public function handle()

$env = getenv('APP_ENV');

$commits = shell_exec('git rev-list --count HEAD');

$shortHash = shell_exec('git log --pretty="%h" -n1 HEAD');
$longHash = shell_exec('git log --pretty="%H" -n1 HEAD');

Expand All @@ -33,7 +35,7 @@ public function handle()

$url = "https://github.com/WaveHack/OpenDominion/commit/{$longHash}";

$version = "<strong>{$env}</strong> @ <a href=\"{$url}\" target=\"_blank\"><strong>#{$shortHash}</strong></a> ({$branch})";
$version = "<strong>r{$commits}</strong> @ {$env} ({$branch}<a href=\"{$url}\" target=\"_blank\"><strong>#{$shortHash}</strong></a>)";

Cache::forever('version', $version);

Expand Down

0 comments on commit 0fa4140

Please sign in to comment.