I am deploying a php project from git through the use of capistrano. I am currently minifying my javascript (using jammit) and css (using yui) through some capistrano tasks already. The issue I see is that I am doing this minification on the destination servers rather than once locally pre-deployment of the code base. The cause of concern is that I switched the javascript minification from yui to jammit and do not want to have to install this new ruby gem on multiple production servers when my deployment servers already have it installed. I inherited the capistrano file from anohter developer so I’m not 100% clear on the process of when the code gets checked out, and when it gets sent to the remote server, and what task I should hook into.
My initial thought is to do it before "deploy" but again, am not sure I’ll have the source code available to act on.
The short answer is "you don’t". The
deployhook calls deploy:update_codeWhich does the following in one fell swoop:
(with some variation depending on your deployment settings).
However,
I was able to to get around this by utilizing the download and upload commands.
I don’t like it as it’s not quite as clean, but it gets the job done the way I need to get it done.