I'm running a Capifony deployment. However, I notice that Capifony's in-built commands are running against the previous release, whereas my custom commands are correctly targeting the current release.
For example, if I run cap -d staging deploy
, I see some commands output like this (linebreaks added):
--> Updating Composer.......................................
Preparing to execute command: "sh -c 'cd /home/myproj/releases/20130924144349 &&
php composer.phar self-update'"
Execute ([Yes], No, Abort) ? |y|
You'll see that this is referring to my previous release - from 2013.
I also see commands referring to this new release's folder (from 2014):
--> Running migrations......................................
Preparing to execute command: "/home/myproj/releases/20140219150009/
app/console doctrine:migrations:migrate --no-interaction"
Execute ([Yes], No, Abort) ? |y|
In my commands, I use the #{release_path}
variable, whereas looking at Capifony's code, it's using #{latest_release}
. But obviously I can't change Capifony's code.
This issue against Capistrano talks about something similar, but I don't think it really helps, as again I can't change Capifony's code.
If I delete my releases
folder on the server, I have a similar problem - #{latest_release}
doesn't have any value, so it attempts to do things like create a folder /app/cache
(since the code is something like mkdir -p #{latest_release}/app/cache
).
(Assuming I don't delete the current
symlink and the release
folder, the specific error I see is when it fails to copy vendors: cp: cannot copy a directory, /home/myproj/current/vendor, into itself
. However, this is just the symptom of the bigger problem - if it thinks the new release is actually the previous one, that explains why current
also points there!)
Any ideas? I'm happy to provide extracts from my deploy.rb
or staging.rb
(I'm using the multistage extension) but didn't just want to dump in the whole thing, so let me know what you're interested in! Thanks