mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Removed pre-release special version handling
This commit is contained in:
parent
8c033ff6c8
commit
70bb014c9f
@ -120,7 +120,6 @@ class BaseController
|
|||||||
|
|
||||||
$versionInfo = $this->getApplicationService()->GetInstalledVersion();
|
$versionInfo = $this->getApplicationService()->GetInstalledVersion();
|
||||||
$this->View->set('version', $versionInfo->Version);
|
$this->View->set('version', $versionInfo->Version);
|
||||||
$this->View->set('releaseDate', $versionInfo->ReleaseDate);
|
|
||||||
|
|
||||||
$localizationService = $this->getLocalizationService();
|
$localizationService = $this->getLocalizationService();
|
||||||
$this->View->set('__t', function (string $text, ...$placeholderValues) use ($localizationService) {
|
$this->View->set('__t', function (string $text, ...$placeholderValues) use ($localizationService) {
|
||||||
|
@ -75,7 +75,7 @@ class ExceptionController extends BaseApiController
|
|||||||
|
|
||||||
return $this->renderPage($response->withStatus(500), 'errors/500', [
|
return $this->renderPage($response->withStatus(500), 'errors/500', [
|
||||||
'exception' => $exception,
|
'exception' => $exception,
|
||||||
'system_info' => $this->getApplicationService()->GetSystemInfo()
|
'systemInfo' => $this->getApplicationService()->GetSystemInfo()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,8 @@ class SystemController extends BaseController
|
|||||||
public function About(Request $request, Response $response, array $args)
|
public function About(Request $request, Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->renderPage($response, 'about', [
|
return $this->renderPage($response, 'about', [
|
||||||
'system_info' => $this->getApplicationService()->GetSystemInfo(),
|
'systemInfo' => $this->getApplicationService()->GetSystemInfo(),
|
||||||
|
'versionInfo' => $this->getApplicationService()->GetInstalledVersion(),
|
||||||
'changelog' => $this->getApplicationService()->GetChangelog()
|
'changelog' => $this->getApplicationService()->GetChangelog()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -53,15 +53,6 @@ class ApplicationService extends BaseService
|
|||||||
if ($this->InstalledVersion == null)
|
if ($this->InstalledVersion == null)
|
||||||
{
|
{
|
||||||
$this->InstalledVersion = json_decode(file_get_contents(__DIR__ . '/../version.json'));
|
$this->InstalledVersion = json_decode(file_get_contents(__DIR__ . '/../version.json'));
|
||||||
|
|
||||||
if (GROCY_MODE === 'prerelease')
|
|
||||||
{
|
|
||||||
$commitHash = trim(exec('git log --pretty="%h" -n1 HEAD'));
|
|
||||||
$commitDate = trim(exec('git log --date=iso --pretty="%cd" -n1 HEAD'));
|
|
||||||
|
|
||||||
$this->InstalledVersion->Version = "pre-release-$commitHash";
|
|
||||||
$this->InstalledVersion->ReleaseDate = substr($commitDate, 0, 19);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->InstalledVersion;
|
return $this->InstalledVersion;
|
||||||
|
@ -27,16 +27,16 @@
|
|||||||
<div class="tab-pane show active"
|
<div class="tab-pane show active"
|
||||||
id="system-info">
|
id="system-info">
|
||||||
<p>
|
<p>
|
||||||
Version <code>{{ $version }}</code><br>
|
Version <code>{{ $versionInfo->Version }}</code><br>
|
||||||
{{ $__t('Released on') }} <code>{{ $releaseDate }}</code> <time class="timeago timeago-contextual"
|
{{ $__t('Released on') }} <code>{{ $versionInfo->ReleaseDate }}</code> <time class="timeago timeago-contextual"
|
||||||
datetime="{{ $releaseDate }}"></time>
|
datetime="{{ $versionInfo->ReleaseDate }}"></time>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
PHP Version <code>{{ $system_info['php_version'] }}</code><br>
|
PHP Version <code>{{ $systemInfo['php_version'] }}</code><br>
|
||||||
SQLite Version <code>{{ $system_info['sqlite_version'] }}</code><br>
|
SQLite Version <code>{{ $systemInfo['sqlite_version'] }}</code><br>
|
||||||
OS <code>{{ $system_info['os'] }}</code><br>
|
OS <code>{{ $systemInfo['os'] }}</code><br>
|
||||||
Client <code>{{ $system_info['client'] }}</code>
|
Client <code>{{ $systemInfo['client'] }}</code>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -36,7 +36,7 @@ Stack trace:
|
|||||||
|
|
||||||
System info:
|
System info:
|
||||||
```
|
```
|
||||||
{!! json_encode($system_info, JSON_PRETTY_PRINT) !!}
|
{!! json_encode($systemInfo, JSON_PRETTY_PRINT) !!}
|
||||||
```
|
```
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user