diff --git a/composer.json b/composer.json index e7a6916..a23c31d 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "lean" : { "autoload": { "definitions" : [ - { "\\Lean\\Console\\Lean" : "definitions" } + "meta/definitions/software.php" ] } } diff --git a/src/Form/Update/Git.php b/src/Form/Update/Git.php index 76378ee..c052839 100644 --- a/src/Form/Update/Git.php +++ b/src/Form/Update/Git.php @@ -40,7 +40,7 @@ class Git implements FormInterface $handle = popen("$command", 'r'); - while ( false !== $output = fgets($handle, 2096) ){ + while ( false !== $output = fgets($handle, 1024) ){ yield trim($output); } diff --git a/src/Lean.php b/src/Lean.php index 104ac8c..fd90f08 100644 --- a/src/Lean.php +++ b/src/Lean.php @@ -4,8 +4,10 @@ namespace Lean\Console; use Psr\Container\ContainerInterface; +#[\Deprecated] abstract class Lean { + #[\Deprecated] public static function definitions() : array { return require(dirname(__DIR__) . "/meta/definitions/software.php"); diff --git a/src/Lib/ConsoleControllerTrait.php b/src/Lib/ConsoleControllerTrait.php index 901c0e8..1e47956 100644 --- a/src/Lib/ConsoleControllerTrait.php +++ b/src/Lib/ConsoleControllerTrait.php @@ -6,8 +6,7 @@ use Psr\Container\ContainerInterface; use Storage\Session; -use Notes\Tell\Attribute\Language, - Notes\Route\Attribute\Object\Route; +use Lean\Console\Form; use Notes\Security\Attribute\{ Security, Taxus }; @@ -30,6 +29,12 @@ trait ConsoleControllerTrait public function version() : string { - return "0.4.1"; + $version = iterator_to_array( + (new Form\Update\Git(getenv('PROJECT_PATH')))->run("/usr/bin/git describe --tags") + ); + +# dump($version); + + return "1.5.0"; } } diff --git a/view/lean-console/base/layout.phtml b/view/lean-console/base/layout.phtml index 3d7208f..cc6a8f0 100644 --- a/view/lean-console/base/layout.phtml +++ b/view/lean-console/base/layout.phtml @@ -10,13 +10,11 @@ + {{ title() }} - - - + {% section "head" %}{% endsection %}