Skip to content

Commit

Permalink
Merge pull request #36 from audetv/feature/version
Browse files Browse the repository at this point in the history
Feature/version
  • Loading branch information
audetv authored Mar 31, 2023
2 parents 790d4d6 + 4ce795c commit f946708
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ update-deps: app-composer-update restart

app-clear:
docker run --rm -v ${PWD}/app:/app -w /app alpine sh -c 'rm -rf var/cache/* var/log/* var/test/*'
docker run --rm -v ${PWD}/app:/app -w /app alpine sh -c 'rm -rf frontend/runtime/cache/* frontend/runtime/cache/*'

app-init: app-permissions app-composer-install app-wait-db app-yii-init \
app-migrations app-console-run \
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/views/layouts/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<footer class="footer mt-auto py-3 text-muted">
<div class="container">
<div class="d-flex align-items-baseline justify-content-between">
<span><?= Html::encode(Yii::$app->name) ?> <?= date('Y') ?>
<span><?= Html::encode(Yii::$app->name) ?> <?= date('Y') ?> <?= \App\helpers\VersionHelper::version(); ?>
<?= Html::a('Обратная связь', ['site/contact']); ?>
<?php
if (Yii::$app->user->isGuest) {
Expand Down
20 changes: 20 additions & 0 deletions app/src/helpers/VersionHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);

namespace App\helpers;

use yii\helpers\Html;

class VersionHelper
{
/**
* Возвращает версию приложения
* @return string
*/
public static function version(): string
{
$version = 'v0.2.2';
return Html::a($version, 'https://github.com/audetv/fct-search/releases/latest', ['target' => '_blank']);
}
}

0 comments on commit f946708

Please sign in to comment.