UPDATE
Envoyer: if you are using Envoyer to deploy to a FreeBSD server, the "illegal flag -T" error should be fixed. 👌
— Laravel (@laravelphp) October 11, 2016
Originally Taylor tried to ‘lookup’ the operating system you were using and then use the correct command. Unfortunately, this broke things for other users so he had to roll it back.
Envoyer: FreeBSD servers are now supported. Just select the option in your server settings! https://t.co/VQiRPiiHFw pic.twitter.com/tIjMmIjb4Q
— Laravel (@laravelphp) November 1, 2016
So he has now included a config option
I have been meaning to try Laravel Envoyer for some time now. At work we have a deployment process which is mainly focused around Codeship with some custom scripts that are either on the server or committed to the repo.
Although there are many options for zero downtime deployment I really like the idea of using Envoyer so I decided to give it a go. Nearly all of our servers are FreeBSD for various reasons and as I excitedly watched the deployment happen for the first time I was disappointed when I saw ‘Finished With Errors’. I clicked on the output button with provides you with some more feedback and I was faced with a rather confusing message.
mv: illegal option -- T usage: mv [-f | -i | -n] [-hv] source target mv [-f | -i | -n] [-v] source ... directory
It looks like the option -T is not available on FreeBSD as it is in Linux systems so the final step where Envoyer activates the new release is not able to move the ‘current-temp’ folder to be the ‘current’ folder.
mv -Tf /home/forge/domain.com/current-temp /home/forge/domain.com/current
I sent a tweet out to see if anyone else was having this issue or if it was something I was doing wrong. I got a helpful tweet back from @FreeBSDhelp which confirmed that the option -T was not available.
No -T option in BSD mv(1) https://t.co/qjnBqAHUYu Linux: https://t.co/rbq30lhHCH @taylorotwell
— FreeBSD Help (@FreeBSDHelp) September 28, 2016
Interestingly if you run the move command without the -T and you already have a current folder it will place the ‘current-temp’ folder inside the ‘current’ folder resulting in ‘/home/forge/domain.com/current/current-temp/’, obviously not what we are looking for. So it looks like the option in FreeBSD is to replace the -T option with -h which will do a similar thing.
So for FreeBSD we need to run
mv -hf /home/forge/domain.com/current-temp /home/forge/domain.com/current
and on all other we can run
mv -Tf /home/forge/domain.com/current-temp /home/forge/domain.com/current
I have exchanged a couple of emails with Taylor and I hope that we will see this merged into Envoyer soon so that I can continue my trial of the product.
I would love to hear from anyone else who has had the same issue.
I’m still seeing the issue on Freebsd 11