cheycron/git-changelog

Parse changelog directly from Git

Installs: 44

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

Type:php

pkg:composer/cheycron/git-changelog

1.0.1 2016-06-05 03:37 UTC

This package is not auto-updated.

Last update: 2025-10-17 23:28:14 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
                )