limenet/git-version

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

v0.1.3 2017-05-30 18:51 UTC

README

Build Status Latest Stable Version License Total Downloads StyleCI codecov

Usage

<?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());