Skip to content

Generate a changelog and releases with version management with artisan

License

Notifications You must be signed in to change notification settings

codepeak/laravel-release-changelog-generator

 
 

Repository files navigation

Package to create releases and changelogs in laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads PHP-CS-Fixer Update Changelog GIT

This package add a changelog management over command line and a version release management. So you can add new changelog items and if you release, the changelog ist update with new version and the version file also. So it is easy to manage a customer changelog.

The changelog is a json file that can easy integrate into a controller to present to end customer.

See ROADMAP for new functions.

Installation

You can install the package via composer:

composer require lightszentip/laravel-release-changelog-generator

Please publish the necessary files with:

php artisan vendor:publish --provider="Lightszentip\LaravelReleaseChangelogGenerator\ServiceProvider"

Usage

If the command use without arguments, the command line create a ask for all necessary arguments.

Create a new changelog item:

php artisan changelog:add --type="feat" --message="Implement the whole function for magic"

You can find the result in resources/.changes/changelog.json

Release the changelog

php artisan changelog:release --releasename="My First Release" --type=patch

This update the version.yml to the next patch vesion and add in the changelog.json a new release with all current changelog items.

Update CHANGELOG.md file:

This will update the CHANGELOG.md file in the root with your changes.

php artisan changelog:generate-md

Get version in the application

Blade

@releasechangelog

To get a special format for the version, you find in the 'releasechangelog.php' in the config dir the item 'version_formats'. You can add new formats and/or change the existing. To use it:

@releasechangelog('full')

Code

app('releasechangelog.version')->showVersion($format)

Config

prerelease set to false to remove the "rc" part from version

To use antother pre release name as 'rc', change it on version.yml direct.

Example Result

version.yml

label: v
major: 1
minor: 0
patch: 1
prerelease: rc
prereleasenumber: 0
buildmetadata: null
timestamp:
    date: null
    timestamp: null

changelog.json

{"unreleased":{"name":"tbd","date":"","release":false},
"1.0.1.rc0":{"name":"My First Release","date":"2022-12-22 23:56:34","release":true,"feat":[{"message":"My first feature"},{"message":"Implement the whole function for magic"}]}}

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.

About

Generate a changelog and releases with version management with artisan

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • PHP 98.5%
  • Blade 1.5%