the-toster / composer-version
Composer plugin that adds npm-like version commands (patch, minor, major) and use git tags to store versions
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- composer-plugin-api: ^2.0|^1.1
Requires (Dev)
- composer/composer: ^2.0|^1.9
- phpunit/phpunit: ^7.5
- vimeo/psalm: ^3.9
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