Download the PHP package nucleos/relazy without Composer
On this page you can find all versions of the php package nucleos/relazy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nucleos/relazy
More information about nucleos/relazy
Files in nucleos/relazy
Package relazy
Short Description relazy - The lazy release tool
License MIT
Homepage https://github.com/nucleos/relazy
Informations about the package relazy
relazy
Relazy is a handy tool to help releasing new versions of your software. You can define the type of version generator you want to use (e.g. semantic versioning), where you want to store the version (e.g. in a changelog file or as a VCS tag) and a list of actions that should be executed before or after the release of a new version.
This project was originally inspired by the RMT project, but with some major refactoring and more modern approach (e.g. PHP config with autocompletion).
Installation
Option 1: As a development dependency of your project
In order to use relazy in your project you should use Composer to install it as a dev-dependency. Just go to your project's root directory and execute:
Then you must need to create a .relazy.php
config file to run the relazy
executable script in your project's
root folder.
Once there, your best option is to pick one of the configuration examples below and adapt it to your needs.
Option 2: As a global Composer installation
You can add relazy to your global composer.json
and have it available globally for all your projects. Therefor
just run the following command:
Make sure you have ~/.composer/vendor/bin/
in your $PATH.
Option 3: As a Phar file
Relazy can be installed through phar-composer, which needs to be installed therefor. This useful tool allows you to create runnable Phar files from Composer packages.
If you have phar-composer installed, you can run:
and have phar-composer build and install the Phar file to your $PATH
, which then allows you to run it simply as relazy
from the command line, or you can run
and copy the resulting Phar file manually to where you need it. Either make the Phar file executable
via chmod +x relazy.phar
and execute it directly ./relazy.phar
or run it by invoking it through PHP
via php relazy.phar
.
For the usage substitute relazy with whatever variant you have decided to use.
Usage
Using relazy is very straightforward, just run the command:
Relazy will then execute the following tasks:
- Execute the startup actions
- Ask the user to answer potentials questions
- Execute the pre-release actions
- Release
- Generate a new version number
- Persist the new version number
- Execute the post-release actions
Here is an example output:
Additional commands
The release
command provides the main behavior of the tool, additional some extra commands are available:
current
will show your project current version number (alias version)changes
display the changes that will be incorporated in the next release
Configuration
All relazy configurations have to be done in .relazy.php
. The file is divided in the following elements:
vcs
: The type of VCS you are using, can beGit
orNoop
startupActions
: A list[]
of actions that will be executed just after startup without user interactionpreReleaseActions
: A list[]
of actions that will be executed before the release processversionGenerator
: The generator to use to create a new version (mandatory)versionPersister
: The persister to use to store the versions (mandatory)postReleaseActions
: A list[]
of actions that will be executed after the release
All entries of this config work the same. You have to specify the class you want to handle the action. Example:
Extend it
Relazy is providing some existing actions, generators, and persisters. If needed you can add your own by creating a PHP script in your project, and referencing it in the configuration:
Configuration examples
Most of the time, it will be easier for you to pick up an example below and adapt it to your needs.
No VCS, changelog updater only
Using Git tags, simple versioning and startup actions
Using Git tags, simple versioning and startup actions
Using Git tags, simple versioning and startup actions, and gpg sign commit and tags
Using Git tags with prefix, semantic versioning, updating two files and pushing automatically
All versions of relazy with dependencies
ext-json Version *
symfony/console Version ^7.0
symfony/dependency-injection Version ^7.0
symfony/process Version ^7.0
vierbergenlars/php-semver Version ^3.0.4