laravel / envoy

Elegant SSH tasks for PHP.

Home Page:https://laravel.com/docs/envoy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request for Multiple Envoy Blade Files Support

fh32000 opened this issue · comments

Issue Description:

Currently, the vendor/bin/envoy command in Laravel supports only a single Envoy Blade file named Envoy.blade.php. However, there are scenarios where developers might want to have the flexibility to use different Envoy Blade files for different deployment scenarios or configurations.

Feature Request:

I would like to propose adding a feature that allows developers to specify a custom Envoy Blade file when running the vendor/bin/envoy command. This feature would provide more flexibility and customization options for deploying Laravel applications.

Use Case:

In some projects, there may be multiple deployment configurations that require separate Envoy files. For example, different environments (staging, production) might have distinct deployment requirements. By allowing developers to specify the Envoy file to use, it would be possible to streamline the deployment process and avoid duplicating tasks across different Envoy files.

Proposed Solution:

Introducing a --file or -f flag to the vendor/bin/envoy command would allow developers to specify the name of the Envoy Blade file to use. This would make it easy to select the appropriate deployment configuration without having to maintain multiple copies of the same tasks in separate files.

Example Usage:

php vendor/bin/envoy run --file=Envoy2.blade.php deploy --branch=testing

This command would run the deploy task from the Envoy2.blade.php file, deploying from the testing branch.

Benefits:

Improved flexibility: Developers can create custom Envoy Blade files for different deployment scenarios without the need to modify the default Envoy.blade.php.
Simplified maintenance: Task definitions can be centralized in specific Envoy files, avoiding duplication and making it easier to manage deployment configurations.
Enhanced customization: Projects with unique deployment requirements can utilize distinct Envoy files tailored to their needs.
Additional Notes:

This feature enhancement could provide a significant advantage for Laravel projects with complex deployment setups, enabling seamless customization and efficient management of deployment tasks.

I believe that implementing this feature would enhance the utility of the vendor/bin/envoy command and improve the overall deployment experience for Laravel developers.

Thank you for considering this feature request.

Sincerely,
Mohammed
@fh32000

We don't have plans for this ourselves atm but we're open to PR's if you want to try one 👍