rtablada/version-master 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rtablada/version-master

最新稳定版本:v1.1.0

Composer 安装命令:

composer require rtablada/version-master

包简介

A git based versioning tool for PHP projects with Laravel Service Providers

README 文档

README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Version Master is a git based versioning tool for PHP projects with Laravel Service Providers. This package uses the .git storage file to read the current hash for the specified project or folder.

Since, the GitHashReader uses file access, it does not need to have access to the git command or exec privileges which may not be available in production environments.

Install

Via Composer

$ composer require rtablada/version-master

Usage

The basic class for this package is the GitHashReader. It requires two arguments:

  • required - An instance of Illuminate\Filesystem - Used to read from the Git File Tree
  • required - A string path for the root of the git project.
  • optional - A string path for the name of the git storage folder (defaults to .git)
$reader = new Rtablada\VersionMaster\GitHashReader();

echo $reader->getFullVersion(); // Outputs latest hash on git HEAD

Laravel Usage

This package also includes a Service Provider to allow use in Laravel Applications.

This Service Provider acts in two ways:

  • Registers a singleton so that Rtablada\VersionMaster\GitHashReader can be injected.
  • Registers a @version() helper in Blade to output the short version number.

To install this Service Provider just add Rtablada\VersionMaster\GitVersionProvider::class in your providers array in config/app.php.

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email ryan.tablada@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 1.19k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-04