Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/recipe/deploy/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ require 'recipe/deploy/info.php';

## Configuration
### what
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/info.php#L8)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/info.php#L9)

Defines "what" text for the 'deploy:info' task.
Uses one of the following sources:
1. Repository name
2. Application name
:::info Autogenerated
The value of this configuration is autogenerated on access.
:::
Expand All @@ -26,7 +27,7 @@ The value of this configuration is autogenerated on access.


### where
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/info.php#L20)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/info.php#L25)

Defines "where" text for the 'deploy:info' task.
Uses one of the following sources:
Expand All @@ -43,7 +44,7 @@ The value of this configuration is autogenerated on access.
## Tasks

### deploy\:info {#deploy-info}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/info.php#L29)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/info.php#L34)

Displays info about deployment.

Expand Down
5 changes: 5 additions & 0 deletions recipe/deploy/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
// Defines "what" text for the 'deploy:info' task.
// Uses one of the following sources:
// 1. Repository name
// 2. Application name
set('what', function () {
$repo = get('repository');
if (!empty($repo)) {
return preg_replace('/\.git$/', '', basename($repo));
}
$application = get('application');
if (!empty($application)) {
return $application;
}
return 'something';
});

Expand Down