Yii2 command for fast releasing and versioning composer packages ¶
This command can publish and calculate the version of the set of packages in your project at a one fast and simple run:
`
./yii release`
Installation ¶
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require execut/yii2-composer-release-command "dev-master"
or add
"execut/yii2-composer-release-command": "dev-master"
to the `
require`
section of your composer.json
file.
Configuration example ¶
Add to console config following rules:
`
php
[
'controllerMap' => [
'release' => [
'class' => \execut\release\ReleaseController::class,
'vendorFolder' => 'execut', // Folder(s) inside @vendor for releasing, supported list
],
],
];
`
Usage ¶
All released packages must be installed with .git via --prefer-source composer flag (see composer documentation). Fast way for adding git inside installed packages:
- Delete them
- Run
`
composer install --prefer-source`
for fresh install of package with git server
After running console command `
./yii release`
the happen next operations:
- Each folder with .git, specified inside configuration file checked for new changes
- If has changes happen the next operations:
- git add .
- git pull origin master
- git checkout master
- git pull
- git commit with message passed via console argument --message(m) or entered inside console dialog
- git push
- Calculating and tagging new version by next rule: (major version).(minor version).(path version). Console argument --level(l) set level of calculation next version. 0 - major, 1 - minor, 2 - path (default)
- git push --tags
Console arguments:
Name | Short name | Description | Default value |
---|---|---|---|
--message | -m | Commit message | |
--level | -l | level of calculated next version. 0 - major, 1 - minor, 2 - path | 2 |
License ¶
yii2-composer-release-command is released under the Apache License Version 2.0. See the bundled LICENSE.md
for details.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.