A package to display the latest git tag version and will also allow you to easily and/or programmatically bump the major, minor and patch tags for the repository.
# Basic Semver Looks Like:
{major}.{minor}.{patch}
You can install the package via composer:
composer require elegasoft/product-version
To see the current semver version of the repository
php artisan product-version:current
# Output Example: v1.0.3-125-0ca4a7187
The default is to bump the patch version of the semver
# Starting with: v1.0.3-125-0ca4a7187
php artisan product-version:bump
# Output Example: v1.0.4-125-0ca4a7187
To bump the major semver version of the repository
# Starting with: v1.0.3-125-0ca4a7187
php artisan product-version:bump --major
# Output Example: v2.0.0-125-0ca4a7187
To bump the minor semver version of the repository
# Starting with: v1.0.3-125-0ca4a7187
php artisan product-version:bump --minor
# Output Example: v1.1.0-125-0ca4a7187
To see the current semver version of the repository
ProductVersion::current();
// Output Example: v1.0.3-125-0ca4a7187
The default is to bump the patch version of the semver
// Starting w: v1.0.3-125-0ca4a7187
ProductVersion::bump();
// Output Example: v1.0.4-125-0ca4a7187
To bump the major semver version of the repository
// Starting w: v1.0.3-125-0ca4a7187
ProductVersion::bump($major = true, $minor = false);
// Output Example: v2.0.0-125-0ca4a7187
To bump the minor semver version of the repository
// Starting w: v1.0.3-125-0ca4a7187
ProductVersion::bump($major = false, $minor = true);
// Output Example: v1.1.0-125-0ca4a7187
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email jason@elegasoft.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.