hnhdigital-os/laravel-git-info
最新稳定版本:v1.04
Composer 安装命令:
composer require hnhdigital-os/laravel-git-info
包简介
Get information about the current git state.
README 文档
README
This package has been developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital.
Provides a wrapper for getting info from GIT.
Install
Via composer:
$ composer require hnhdigital-os/laravel-git-info ~1.0
Laravel configuration
Enable the facade by editing config/app.php:
'aliases' => [ ... 'Git' => Bluora\LaravelGitInfo\Facade::class, ... ];
The service provider will autoload from Laravel 5.5.
To enable the service provider in versions prior to Laravel 5.4, edit the config/app.php:
Enable the service provider by editing config/app.php:
'providers' => [ ... Bluora\LaravelGitInfo\ServiceProvider::class, ... ];
Usage
Laravel
Current version. Eg 'de83088-dirty'.
echo Git::version();
Current branch. Eg 'master'.
echo Git::branch();
Current total commits. Eg 7.
echo Git::commits();
Commit difference between current branch and master.
Optional arguments include specifying a branch and returning a text version.
echo Git::commitsBehind($branch = 'master', $return_text = true);
Show the status of the submodules.
echo Git::submoduleStatus();
PHP
use Bluora\LaravelGitInfo\GitInfo; echo (new GitInfo())->version();
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 15.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-08