Skip to content

Commit

Permalink
Prepare for version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ParisLiakos committed Dec 30, 2016
1 parent 4b4c9ee commit 7e58fac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/Siwapp/CoreBundle/Extension/SiwappCoreTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ public function getFilters()

public function getFunctions()
{
return array(
new \Twig_SimpleFunction('bundle_exists', array($this, 'bundleExists')),
);
return [
new \Twig_SimpleFunction('siwapp_version', [$this, 'version']),
new \Twig_SimpleFunction('bundle_exists', [$this, 'bundleExists']),
];
}

/**
Expand All @@ -52,4 +53,9 @@ public function bundleExists($bundle)
{
return array_key_exists($bundle, $this->bundles);
}

public function version(): string
{
return \Siwapp\CoreBundle\SiwappCoreBundle::version;
}
}
2 changes: 1 addition & 1 deletion src/Siwapp/CoreBundle/Resources/views/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<h1>
<a href="{{ bundle_exists('SiwappDashboardBundle') ? path('dashboard_index') : path('invoice_index') }}">
<img src="{{ asset('bundles/siwappcore/img/logo.png') }}" alt="Siwapp" />
<span class="version">v.1.0-DEV</span>
<span class="version">v{{ siwapp_version() }}</span>
</a>
</h1>

Expand Down
1 change: 1 addition & 0 deletions src/Siwapp/CoreBundle/SiwappCoreBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@

class SiwappCoreBundle extends Bundle
{
const version = '1.0.0';
}

0 comments on commit 7e58fac

Please sign in to comment.