cheycron / git-changelog
直接从 Git 解析变更日志
1.0.1
2016-06-05 03:37 UTC
Requires
- php: >=5.3.0
- illuminate/support: ~4.0|~5.0|~5.1
- league/commonmark: ^0.13
This package is not auto-updated.
Last update: 2024-09-20 18:48:06 UTC
README
直接从 GIT 获取当前版本和变更日志。
安装
将以下内容添加到您项目的 composer.json 文件中的 require
部分
"cheycron/git-changelog": "1.0.1",
将此内容添加到 config/app.php 文件中的 providers 数组
Cheycron\Gitchangelog\GitChangelogServiceProvider::class,
运行 composer update
下载此包
php composer.phar update
获取当前版本
GitChangelog::currentVersion(); // Returns v1.x.x GitChangelog::append('v2')->preppend(' beta')->currentVersion() // Returns v2.x.x beta
获取变更日志
GitChangelog::parse()->changelog;
将返回
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 )