File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -21,3 +21,4 @@ coverage.html
2121/* .bat
2222/filestorage
2323app /V1Module /presenters /_autogenerated_annotations_temp.php
24+ /app /.version
Original file line number Diff line number Diff line change 22
33namespace App \Helpers ;
44
5- use limenet \GitVersion \Directory ;
6- use limenet \GitVersion \Formatters \CustomFormatter ;
75use Nette ;
86use Nette \Utils \Arrays ;
97
@@ -56,7 +54,9 @@ public function __construct(array $config)
5654 $ this ->versionFormat = Arrays::get ($ config , ["versionFormat " ], "{tag} " );
5755
5856 // version is constructed from git version tag
59- $ this ->version = (new Directory (__DIR__ ))->get (new CustomFormatter ($ this ->versionFormat )) ?: "UNKNOWN " ;
57+ $ versionFile = __DIR__ . "/../../.version " ;
58+ $ version = file_exists ($ versionFile ) ? trim (@file_get_contents ($ versionFile )) : null ;
59+ $ this ->version = $ version ?: "UNKNOWN " ;
6060 }
6161
6262 public function getAddress ()
Original file line number Diff line number Diff line change 3838 "ext-zip" : " >=1.15" ,
3939 "latte/latte" : " ^3.1" ,
4040 "league/commonmark" : " ^2.8" ,
41- "limenet/git-version" : " v0.1.6" ,
4241 "nelmio/alice" : " ^3.17" ,
4342 "nette/application" : " ^3.2" ,
4443 "nette/bootstrap" : " ^3.2" ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ License: MIT
1313Group: Development/Libraries
1414BuildRoot: %{_tmppath }/%{name }-%{version }-%{release }-buildroot
1515Prefix: %{_prefix }
16- Vendor: Petr Stefan < UNKNOWN >
16+ Vendor: ReCodEx Team
1717Url: https://github.com/ReCodEx/api
1818Requires(post): systemd
1919Requires(preun): systemd
@@ -41,6 +41,7 @@ ln -sf /var/log/recodex/core-api %{buildroot}%{install_dir}/log
4141mkdir -p %{buildroot }%{install_dir }/temp
4242cp -r www %{buildroot }%{install_dir }/www
4343cp -r app %{buildroot }%{install_dir }/app
44+ echo " v%{version}-%{release}" > %{buildroot }%{install_dir }/app/.version
4445cp -r bin %{buildroot }%{install_dir }/bin
4546cp -r migrations %{buildroot }%{install_dir }/migrations
4647mkdir -p %{buildroot }%{install_dir }/fixtures
You can’t perform that action at this time.
0 commit comments