shivas / versioning-bundle

Simple way to version (semantic versioning 2.0.0) your Symfony2/3/4/5/6 application
MIT License
111 stars 30 forks source link

.git may be a file instead of a directory #68

Closed sorrx closed 3 years ago

sorrx commented 4 years ago

Note: Also you can have a plain text file .git at the root of your working tree, containing gitdir: <path> to point at the real directory that has the repository. (source: https://git-scm.com/docs/gitrepository-layout )

I have a project, where this is the case and the GitRepositoryProvider does not work out of the box.

Simple fix: In Provider/GitRepositoryProvider.php replace line 55 if (is_dir($path . DIRECTORY_SEPARATOR . '.git')) { with if (file_exists($path . DIRECTORY_SEPARATOR . '.git')) {

dontub commented 3 years ago

Thanks for reporting!