Add base build info.

This commit is contained in:
James Cole 2023-04-29 11:15:30 +02:00
parent 4c26f613ee
commit 6be6187532
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
2 changed files with 17 additions and 2 deletions

View File

@ -34,8 +34,8 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Routing\Redirector;
use Illuminate\View\View;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
use Monolog\Handler\RotatingFileHandler;
/**
@ -121,6 +121,8 @@ class DebugController extends Controller
$now = today(config('app.timezone'))->format('Y-m-d H:i:s e');
$buildNr = '(unknown)';
$buildDate = '(unknown)';
$baseBuildNr = '(unknown)';
$baseBuildDate = '(unknown)';
$expectedDBversion = config('firefly.db_version');
$foundDBversion = FireflyConfig::get('db_version', 1)->data;
if (file_exists('/var/www/counter-main.txt')) {
@ -129,6 +131,13 @@ class DebugController extends Controller
if (file_exists('/var/www/build-date-main.txt')) {
$buildDate = trim(file_get_contents('/var/www/build-date-main.txt'));
}
if('' !== (string)env('BASE_IMAGE_BUILD')) {
$baseBuildNr = env('BASE_IMAGE_BUILD');
}
if('' !== (string)env('BASE_IMAGE_DATE')) {
$baseBuildDate = env('BASE_IMAGE_DATE');
}
$phpVersion = PHP_VERSION;
$phpOs = PHP_OS;
@ -220,6 +229,8 @@ class DebugController extends Controller
'loginProvider',
'buildNr',
'buildDate',
'baseBuildNr',
'baseBuildDate',
'bcscale',
'userAgent',
'displayErrors',

View File

@ -18,11 +18,15 @@ Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION
| --- | --- |
| Firefly III | {{ FF_VERSION }} |
| Firefly III API | {{ config('firefly.api_version') }} |
| Build | {{ buildNr }}, {{ buildDate }} |
{% if isDocker %}| Build | {{ buildNr }}, {{ buildDate }} |
| Base Build | {{ baseBuildNr }}, {{ baseBuildDate }} |{% endif %}
| DB version | {{ foundDBversion }} (exp. {{ expectedDBversion}}) |
{% if not isDocker %}| Docker | No |{% endif %}
| PHP | `{{ phpVersion }}` |
| Host | `{{ phpOs }}` |
| System info | Value |
| --- | --- |
| System TZ | {{ tz }} |