Skip to content

thewalkingcoder/gitversion-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TwcGitVersion

Extract last git tag to manage app versioning.

Installation

composer require twc/gitversion-bundle

Basic Usage

Configuration

key definition default
default_version value when tag not exist v0.1.0
file_name file Name including last git tag VERSION
#If you want to change default value create config/packages/twc_gitversion.yaml

twc_gitversion:
  default_version: 'v0.0.0'

Generate version

bin/console twc:generate:version

Get last version

with twig

{{ twc_version }}

with php

use Twc\GitversionBundle\Provider\GitVersionProvider;

public function home(GitVersionProvider $gitVersionProvider)
{ 
    $version = $gitVersionProvider->get();
    dump($version->toString());
}

About

Extract last git tag to manage app versioning

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages