the-toster/composer-version

Composer plugin that adds npm-like version commands (patch, minor, major) and use git tags to store versions

3.0.0 2021-04-20 11:22 UTC

This package is auto-updated.

Last update: 2024-11-20 19:31:47 UTC


README

Add NPM-like version commands to composer It uses git tags to store version information

Installation

composer global require the-toster/composer-version

Usage

$ composer version 0.0.1
0.0.1
$ composer version patch
0.0.2
$ composer version minor
0.1.0
$ composer version major
1.0.0

What it does

composer version get 
# parse `git describe` to get version numbers (major.minor.patch) from latest tag 

composer version 1.0.1
# creates new annotated tag: `git tag 1.0.1 -a "Version 1.0.1"`

composer version minor
# use `git describe` to extract current version, 
# increments minor: 1.0.1 -> 1.1.0
# creates new annotated tag 1.1.0

# and so on