Your directory structures don't make sense as you've presented them

Releases and current shouldn't be under shared

In i18n cached-copy should be under shared 

You've done some dirty nesting of your applications which doesn't make sense to 
me. 

I would either make the two applications as peers ie: (if it were me I wouldn't 
use the generic 'application' I would use it's real internal moniker)

/var/www/application/current
/var/www/i18n/current

Or I would make i18n's deployment directory in 'applications' shared directory. 

/var/www/application/current
/var/www/application/shared/i18n/current

If a 3rd application is ever introduced and could possibly use the same i18n 
then I might consider the former; but the latter would work in all cases and 
operationally would insulate the two applications from i18n deployment 
dependency conflicts. 

Consider this:

after "deploy:update_code", "deploy:i18n"
namespace :deploy do
  task :i18n do
    system "cap #{stage} i18n deploy"
  end
end
task :i18n do
   ....setup repo app name etc....
end

I'm not positive of the stage variable when using capistrano-ext since I don't 
use it. 

And I think you have to do some extra work to manage the exit code from a 
system call, you could also leverage popen3 if you need more control. I think 
cap has a run_local helper that might even be more appropriate. 


On Nov 9, 2011, at 7:26 AM, Craig White <[email protected]> wrote:

> We really need two capistrano timestamped deploys
> 
> The i18n is the language translations for the main code and they are 
> typically maintained/updated separately (except perhaps for the initial 
> deploy).
> 
> Basically I am trying to get capistrano to:
> 
> - (main code) /var/www/application/shared/cached-copy
>              /var/www/application/shared/releases
>              /var/www/application/shared/current
> 
> - (i18n xlat) /var/www/application/i18n/cached-copy
>              /var/www/application/i18n/releases
>              /var/www/application/i18n/current
> 
> and finally
> ln -nsf /var/www/application/i18n/current 
> /var/www/application/current/config/locales
> 
> On Nov 8, 2011, at 8:59 PM, Donovan Bray wrote:
> 
>> You just haven't located all of the magic sauce yet. 
>> 
>> You can bend capistrano to do a lot of stuff it wasn't intended for; after 
>> all it's just ruby.
>> 
>> One question I would ask is: Do you really need two capistrano timestamped 
>> deploys; or is one project really a dependency of the other?
>> 
>> You might be better served to only deploy the top level application in the 
>> timestamped directory then create a task for installing this dependency that 
>> just does a nieve checkout into the top level deploys release directory. 
>> That then retains the ability to rollback to the previous release dir that 
>> has a matched set of top level app with it's dependency... And your not 
>> changing cap internals to do it. 
>> 
>> On Nov 8, 2011, at 1:15 PM, Craig White <[email protected]> wrote:
>> 
>>> We are currently running scripts via a modified vlad already - I was 
>>> wondering if capistrano was able to deploy from 2 different subversion 
>>> paths and Donovan suggested yes it was possible and I implemented per his 
>>> suggestion.
>>> 
>>> The problem with your suggestion is that it doesn't allow me to choose 
>>> which svn branch/tag/trunk and doesn't offer rollback, etc.
>>> 
>>> Craig
>>> 
>>> On Nov 8, 2011, at 12:40 PM, Lee Hambley wrote:
>>> 
>>>> When you have two separate projects, they aught to be submodules of 
>>>> oneanother (depending how the heirarchy makes sense) then your I18n deploy 
>>>> is "ssh me@theserver 'cd ./the/project/dir && git submodule update i18n' "
>>>> 
>>>> - Lee
>>>> 
>>>> -- 
>>>> * You received this message because you are subscribed to the Google 
>>>> Groups "Capistrano" group.
>>>> * To post to this group, send email to [email protected]
>>>> * To unsubscribe from this group, send email to 
>>>> [email protected] For more options, visit this group 
>>>> at http://groups.google.com/group/capistrano?hl=en
>>> 
>>> -- 
>>> Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [email protected]
>>> 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
>>> www.ttiassessments.com 
>>> 
>>> Need help communicating between generations at work to achieve your desired 
>>> success? Let us help!
>>> 
>>> -- 
>>> * You received this message because you are subscribed to the Google Groups 
>>> "Capistrano" group.
>>> * To post to this group, send email to [email protected]
>>> * To unsubscribe from this group, send email to 
>>> [email protected] For more options, visit this group 
>>> at http://groups.google.com/group/capistrano?hl=en
>> 
>> -- 
>> * You received this message because you are subscribed to the Google Groups 
>> "Capistrano" group.
>> * To post to this group, send email to [email protected]
>> * To unsubscribe from this group, send email to 
>> [email protected] For more options, visit this group 
>> at http://groups.google.com/group/capistrano?hl=en
> 
> -- 
> Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [email protected]
> 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com 
> 
> Need help communicating between generations at work to achieve your desired 
> success? Let us help!
> 
> -- 
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to 
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to