File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,20 @@ if (!class_exists('s9e\\RegexpBuilder\\Command\\Build'))
1919 }
2020}
2121
22+ $ version = '@git_tag@ ' ;
23+ if ($ version [0 ] === '@ ' )
24+ {
25+ $ version = Composer \InstalledVersions::getPrettyVersion ('s9e/regexp-builder-command ' );
26+ }
27+
2228// Set the default name to match the name of this file
2329class SingleCommand extends s9e \RegexpBuilder \Command \Build
2430{
2531 protected static $ defaultName = 'build-regexp ' ;
2632}
2733$ command = new SingleCommand ;
2834
29- $ app = new Symfony \Component \Console \Application ($ command ->getName (), ' @git_tag@ ' );
35+ $ app = new Symfony \Component \Console \Application ($ command ->getName (), $ version );
3036$ app ->add ($ command );
3137$ app ->setDefaultCommand ($ command ->getName (), true );
3238$ app ->run ();
You can’t perform that action at this time.
0 commit comments