tendersrl / version
Automatically create git tag about your Laravel app version
Installs: 1 326
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: ^7.2.5|^8.0
- brutusbossnl/laravel-version: ^1.3
This package is auto-updated.
Last update: 2025-03-09 07:53:22 UTC
README
Automatically create git tag about your Laravel app version
Description
This package is a Laravel (5.5+) utility which helps you keep and manage your application version, increment version numbers (major, minor, patch, commit), and can also use your last commit hash.
This package is an extension of https://github.com/antonioribeiro/version, that let you to create automatically a git tag every time you update your app version.
Please refer to parent package to extensive documentation.
Easily increment your version numbers, using Artisan commands
php artisan version:minor
Which should ask you your commit message
$ Enter your commit message
>
Then should create a new git tag and should print the new version number
New patch: 11 MyApp version 2.6.11 (commit cb2afb64)
Available for all of them:
$ php artisan version:major $ php artisan version:minor $ php artisan version:patch
Then you only need to push your commit and your tag:
$ git push --tags
Formating tag
After publishing configuration, entry as tag-format
the format you prefer to tag your commit.
tag-format: tag
You can also specify the tag format via the --tag-format
option:
$ php artisan version:patch --tag-format=compact
Other available options
If you want to increment your app version without creating a commit or tag, you can use the --no-commit
and --no-tag
options
$ php artisan version:patch --no-commit --no-tag
Install
Via Composer
$ composer require tendersrl/version
Then publish the configuration file you'll have to:
$ php artisan vendor:publish --provider="TenderSrl\Version\VersionServiceProvider"
And you should be good to use it in your views:
@version
Minimum requirements
- Laravel 5.5
- PHP 7.0
License
This package is licensed under the MIT License