A helper class to get the current GIT version of the project.
Require it in your project:
composer require gomzyakov/git-version
Everything is very simple. You can get the git version string with:
$version = \Gomzyakov\GitVersion\GitVersion::getVersion();
Ensure your git tags are pushed to your servers so that the versions are described properly.
During development and possibly in staging environments allow the version to be determined automatically (this is done via git describe
).
If you find any package errors, please, make an issue in current repository.
This is open-sourced software licensed under the MIT License.