Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forced before/after deployment actions #159

Open
deilounge opened this issue Jul 11, 2022 · 0 comments
Open

Forced before/after deployment actions #159

deilounge opened this issue Jul 11, 2022 · 0 comments

Comments

@deilounge
Copy link

Foremost - great project. It really helped me with my daily routine and simplified my work.

During recent deployment I stumbled upon one issue, that I couldn't really nicely resolve on the basis of solutions provided by instructions attached in readme file.

Let's say I have a project that needs to be deployed on remote server. I have a config file that stores configuration data for local/develoment environment - let's call it 'inc.globals.php'. On the other hand I have a config file that I locally store config data used by remote server after deployment to i.e. connect to db - let's call it 'inc.globals-prod.php'. In case of deployment I want the deployment software to omit 'inc.globals.php' that is my local config file and upload 'inc.globals-prod.php' to remote location and change its name to 'inc.globals.php'. And I can't do this without changing at least one letter in the content of some local file to make FTP-Deployment performe before/after actions.

The only way I found to uplode inc.globalc-prod.php' on the server and change its name to proper config file is to use:
before/after[]= upload: inc.globals-prod.php inc.globals.php
Any other option - like trying to performe some ftp commands including deleting the files, changing its names remotely that is RNFR RNTO - throws 'SITE EXEC' errors during deployment.

As mentioned already 'before/after' option will in fact change 'inc.globals-prod.php' name to 'inc.globals.php' remotely BUT some conditions and limitations occur - the 'before/after[]' command does not perform if there was no change to any file and as 'inc.globals-prod.php' is on ignore list in deployment.ini (as I want to have only one config file on remote server with inc.globals.php name) it will not allow me to upload it by deplyoment process and then change its name with FTP command.

Is there any other command/section like 'before/after[]' that will always be executed during deployment independently whether any changes where made to tracked file list? Is there a way to use FTP commands instead of upload file1 file2 command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant