File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,16 @@ jobs:
1717 - name : Setup PHP
1818 uses : shivammathur/setup-php@v2
1919 with :
20- php-version : ' 8.2 '
20+ php-version : ' 8.4 '
2121 extensions : json, fileinfo
2222 tools : composer
2323
2424 - name : Install dependencies
2525 run : composer install --no-dev --optimize-autoloader
2626
27+ - name : Inject version from tag
28+ run : sed -i "s/public const VERSION = .*/public const VERSION = '\${{ github.ref_name }}';/" src/Application.php
29+
2730 - name : Build PHAR
2831 run : composer build-phar
2932
Original file line number Diff line number Diff line change 4949 */
5050class Application
5151{
52+ public const VERSION = '1.3.0 ' ;
53+
5254 private ContainerBuilder $ containerBuilder ;
5355
5456 public function __construct ()
@@ -233,7 +235,7 @@ private function configureApplication(): void
233235 $ this ->containerBuilder ->register (SymfonyApplication::class, SymfonyApplication::class)
234236 ->setArguments ([
235237 'Cognitive Code Analysis ' ,
236- ' 1.3.1 '
238+ self :: VERSION
237239 ])
238240 ->setPublic (true )
239241 ->addMethodCall ('add ' , [new Reference (CognitiveMetricsCommand::class)])
You can’t perform that action at this time.
0 commit comments