twc/gitversion-bundle

Extract last git tag to manage app versioning

v1.0.4 2022-07-26 11:21 UTC

This package is auto-updated.

Last update: 2024-12-20 10:57:57 UTC


README

Extract last git tag to manage app versioning.

Installation

composer require twc/gitversion-bundle

Basic Usage

Configuration

#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());
}