New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

hnhdigital-os/laravel-git-info

Get information about the current git state.
16,070 4
Install
composer require hnhdigital-os/laravel-git-info
Latest Version:v1.04
PHP:>=5.6.0
License:MIT
Last Updated:Oct 28, 2022
Links: GitHub  ·  Packagist
Maintainer: bluora

GIT Info

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

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status StyleCI

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.

Related Packages

epicarrow/git-changelog

A simple service to parse the git log of an application to a readable changelog.

69 1
danielrhodeswarp/git-branch-bubble

Display the current Git branch on every page of your Laravel 5 project

21 0
akaunting/laravel-version

Version management package for Laravel

316,950 38
avto-dev/stacked-dumper-laravel

Stacked variables dumper for Laravel-based application

314,085 4
avto-dev/app-version-laravel

Laravel applications versioning

54,478 25

Version History

Version Released PHP License
v1.04 >=5.6.0 MIT
v1.0.3 >=5.6.0 MIT
v1.0.2 >=5.6.0 MIT
v1.0.1 >=5.6.0 MIT
v1.0.0 >=5.6.0 MIT