hegedustibor/laravel-git-version

Get version of application from git

v1.0.0 2020-10-28 23:15 UTC

This package is auto-updated.

Last update: 2024-04-29 04:27:47 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Do you want to show version of your application from git? It is possible with this package.

Installation

You can install the package via composer:

composer require hegedustibor/laravel-git-version

You can publish the config file with:

php artisan vendor:publish --provider="TiborHegedus\GitVersion\GitVersionServiceProvider" --tag="config"

This is the contents of the published config file:

return [
    'file-name' => 'version',
];

Usage

// Only from file
echo TiborHegedus\Facade\GitVersion::getVersionFromFile();

// Only from git
echo TiborHegedus\Facade\GitVersion::getVersionFromGit();

// Both solution
echo TiborHegedus\Facade\GitVersion::getVersion();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.