diff --git a/docs/recipe/deploy/info.md b/docs/recipe/deploy/info.md index 9a8092766..e0d280f40 100644 --- a/docs/recipe/deploy/info.md +++ b/docs/recipe/deploy/info.md @@ -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. ::: @@ -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: @@ -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. diff --git a/recipe/deploy/info.php b/recipe/deploy/info.php index 90b06bbe6..2a8b95b71 100644 --- a/recipe/deploy/info.php +++ b/recipe/deploy/info.php @@ -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'; });