limenet/git-version

PHP library to generate a version string based on a Git repository.

v0.1.5 2018-02-09 07:23 UTC

README

Build Status Latest Stable Version License Total Downloads StyleCI codecov

Usage

Standalone

<?php

use limenet\GitVersion\Directory;
use limenet\GitVersion\File;
use limenet\GitVersion\Formatters\SemverFormatter;

$directory = new Directory($baseDir);
$version = $directory->get(new SemverFormatter());

$file = new File($baseDir);
$version = $file->get(new SemverFormatter());

Laravel

$version = GitVersion::get();