Last active
December 28, 2022 10:31
-
-
Save breadthe/ce6a815b295c485b4bd91c08a79e1bf2 to your computer and use it in GitHub Desktop.
Revisions
-
breadthe revised this gist
Nov 15, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ // Based on this tweet by @Xewl https://twitter.com/Xewl/status/1459219464369627144 $tag = exec('git describe --tags --abbrev=0'); if (empty($tag)) { $tag = '-.-.-'; } -
breadthe revised this gist
Nov 15, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ // Based on this tweet by @Xewl https://twitter.com/Xewl/status/1459219464369627144 $tag = exec('git describe --tags --abbrev=0'); if (empty($tag) { $tag = '-.-.-'; } -
breadthe created this gist
Nov 14, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // resources/views/app/version.blade.php <div> <span>{{ config('version.string') }}</span> <span>&mdsh;</span> <span>{{ config('app.env') }}</span> <span>—</span> <span>{{ 'Laravel ' . app()->version() }}</span> <span>—</span> <span>{{ app()->getLocale() }}</span> <span>—</span> <span>{{ 'PHP ' . PHP_VERSION }}</span> </div> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ <?php // config/version.php // Based on this tweet by @Xewl https://twitter.com/Xewl/status/1459219464369627144 $tag = exec('git describe --tags --abbrev=0'); if ($empty($tag) { $tag = '-.-.-'; } $hash = trim(exec('git log --pretty="%h" -n1 HEAD')); $date = Carbon\Carbon::parse(trim(exec('git log -n1 --pretty=%ci HEAD'))); return [ 'tag' => $tag, 'date' => $date, 'hash' => $hash, 'string' => sprintf('%s-%s (%s)', $tag, $hash, $date->format('d/m/y H:i')); ];