2017 © Pedro Peláez
 

library laravel-git-info

Get information about the current git state.

image

bluora/laravel-git-info

Get information about the current git state.

  • Tuesday, November 29, 2016
  • by bluora
  • Repository
  • 1 Watchers
  • 3 Stars
  • 55 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

GIT Info

This package has been developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital., (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Build Status StyleCI, (*3)

Provides a wrapper for getting info from GIT., (*4)

Install

Via composer:, (*5)

$ composer require hnhdigital-os/laravel-git-info ~1.0, (*6)

Laravel configuration

Enable the facade by editing config/app.php:, (*7)

    'aliases' => [
        ...
        'Git' => Bluora\LaravelGitInfo\Facade::class,
        ...
    ];

The service provider will autoload from Laravel 5.5., (*8)

To enable the service provider in versions prior to Laravel 5.4, edit the config/app.php:, (*9)

Enable the service provider by editing config/app.php:, (*10)

    'providers' => [
        ...
        Bluora\LaravelGitInfo\ServiceProvider::class,
        ...
    ];

Usage

Laravel

Current version. Eg 'de83088-dirty'., (*11)

echo Git::version();

Current branch. Eg 'master'., (*12)

echo Git::branch();

Current total commits. Eg 7., (*13)

echo Git::commits();

Commit difference between current branch and master., (*14)

Optional arguments include specifying a branch and returning a text version., (*15)

echo Git::commitsBehind($branch = 'master', $return_text = true);

Show the status of the submodules., (*16)

echo Git::submoduleStatus();

PHP

use Bluora\LaravelGitInfo\GitInfo;

echo (new GitInfo())->version();

Contributing

Please see CONTRIBUTING for details., (*17)

Credits

License

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

The Versions

29/11 2016

dev-master

9999999-dev

Get information about the current git state.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

laravel git version branch

24/11 2016

v1.0.0

1.0.0.0

Get information about the current git state.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

laravel git version branch