Skip to main content
Version: 7.x

Release Recipe

require 'recipe/deploy/release.php';

Source

Configuration

release_name

Source

The name of the release.

Default value
return within('{{deploy_path}}', function () {
$latest = run('cat .dep/latest_release || echo 0');
return strval(intval($latest) + 1);
});

releases_log

Source

Holds releases log from .dep/releases_log file.

Autogenerated

The value of this configuration is autogenerated on access.

releases_list

Source

Return list of release names on host.

Autogenerated

The value of this configuration is autogenerated on access.

release_path

Source

Return release path.

Autogenerated

The value of this configuration is autogenerated on access.

release_revision

Source

Current release revision. Usually a git hash.

Default value
return run('cat {{release_path}}/REVISION');

release_or_current_path

Source

Return the release path during a deployment but fallback to the current path otherwise.

Default value
$releaseExists = test('[ -h {{deploy_path}}/release ]');
return $releaseExists ? get('release_path') : get('current_path');

Tasks

deploy:release

Source

Prepares release.

Clean up unfinished releases and prepare next release

releases

Source

Shows releases list.

Example output:

+---------------------+------example.org ------------+--------+-----------+
| Date (UTC) | Release | Author | Target | Commit |
+---------------------+-------------+----------------+--------+-----------+
| 2021-11-06 20:51:45 | 1 | Anton Medvedev | HEAD | 34d24192e |
| 2021-11-06 21:00:50 | 2 (bad) | Anton Medvedev | HEAD | 392948a40 |
| 2021-11-06 23:19:20 | 3 | Anton Medvedev | HEAD | a4057a36c |
| 2021-11-06 23:24:30 | 4 (current) | Anton Medvedev | HEAD | s3wa45ca6 |
+---------------------+-------------+----------------+--------+-----------+