cheycron/git-changelog

Parse changelog directly from Git

1.0.1 2016-06-05 03:37 UTC

This package is not auto-updated.

Last update: 2024-05-03 17:04:37 UTC


README

Get current versión and changelog directly from GIT.

Installation

Add the following to the require section of your projects composer.json file:

"cheycron/git-changelog": "1.0.1",

Add this to the config/app.php in the providers array

Cheycron\Gitchangelog\GitChangelogServiceProvider::class,

Run composer update to download the package

php composer.phar update

Get Current Version

GitChangelog::currentVersion(); // Returns v1.x.x
GitChangelog::append('v2')->preppend(' beta')->currentVersion() // Returns v2.x.x beta

Get Changelog

GitChangelog::parse()->changelog;

will return

Illuminate\Support\Collection Object
(
    [items:protected] => Array
        (
            [0] => Array
                (
                    [hash] => 65d8355b98987bc2153ade2a3d111dccb4723e61
                    [email] => author@email.com
                    [author] => Cheycron Blaine
                    [date] => Carbon\Carbon Object
                    [message] => Commit Message
                    [markdown] => Commit Message with Markdown
                    [subject] => First Line of the Commit Message
                    [version] => v1.45
                )
            [1] => Array
                (
                    [hash] => 65d8355b98987bc2153ade2a3d111dccb4723e61
                    [email] => author@email.com
                    [author] => Cheycron Blaine
                    [date] => Carbon\Carbon Object
                    [message] => Commit Message
                    [markdown] => Commit Message with Markdown
                    [subject] => First Line of the Commit Message
                    [version] => v1.44
                )