File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
packages/realtime-compiler/src/Http Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 55namespace Hyde \RealtimeCompiler \Http ;
66
77use Hyde \Hyde ;
8+ use OutOfBoundsException ;
89use Hyde \Pages \Concerns \HydePage ;
910use Hyde \Framework \Actions \StaticPageBuilder ;
1011use Hyde \Framework \Actions \AnonymousViewCompiler ;
@@ -46,8 +47,8 @@ public function getProjectInformation(): array
4647 {
4748 return [
4849 'Git Version: ' => app ('git.version ' ),
49- 'Hyde Version: ' => InstalledVersions:: getPrettyVersion ('hyde/hyde ' ) ?: ' unreleased ' ,
50- 'Framework Version: ' => InstalledVersions:: getPrettyVersion ('hyde/framework ' ) ?: ' unreleased ' ,
50+ 'Hyde Version: ' => self :: getPackageVersion ('hyde/hyde ' ),
51+ 'Framework Version: ' => self :: getPackageVersion ('hyde/framework ' ),
5152 'Project Path: ' => Hyde::path (),
5253 ];
5354 }
@@ -169,4 +170,15 @@ protected static function welcomeFrame(): string
169170 </aside>
170171 HTML;
171172 }
173+
174+ protected function getPackageVersion (string $ packageName ): string
175+ {
176+ try {
177+ $ prettyVersion = InstalledVersions::getPrettyVersion ($ packageName );
178+ } catch (OutOfBoundsException ) {
179+ //
180+ }
181+
182+ return $ prettyVersion ?? 'unreleased ' ;
183+ }
172184}
You can’t perform that action at this time.
0 commit comments