How to deploy a specific branch or tag or even a specific revision into
a capistrano release ?
The problem also is that I've setup the svn repository from the trunk
(like everybody does I guess) with:
set :repository,
Proc.new { "--username \\"#{svn_user}\\" " +
"--password \\"#{svn_password}\\" " +
"http://svn.foo.com/#{application}/trunk/" }
Thanks for your help
set :repository,
"https://svn.server.com/#{application}/tags/#{ENV['DEPLOY_VERSION']}"
so now it is deployed with:
cap deploy DEPLOY_VERSION=1.2.5
hope that helps
--
Charles Brian Quinn
self-promotion: www.seebq.com
highgroove studios: www.highgroove.com
slingshot hosting: www.slingshothosting.com
Ruby on Rails Bootcamp at the Big Nerd Ranch
Intensive Ruby on Rails Training:
http://www.bignerdranch.com/classes/ruby.shtml
if ENV['TAG']
deploy_version = "tags/#{ENV['TAG']}"
elsif ENV['BRANCH']
deploy_version = "branches/#{ENV['BRANCH']}"
else
deploy_version = "trunk/"
end
set :application, "foo"
set :svn_password,
Proc.new { Capistrano::CLI.password_prompt('SVN Password: ') }
set :repository,
Proc.new { "--username \\"#{svn_user}\\" " +
"--password \\"#{svn_password}\\" " +
>
> For a client, we altered the repository line to read:
>
> set :repository,
> "https://svn.server.com/#{application}/tags/#{ENV['DEPLOY_VERSION']}"
>
> so now it is deployed with:
>
> cap deploy DEPLOY_VERSION=1.2.5
>
> hope that helps
>
> On 1/7/07, Eugenol <eug...@gmail.com> wrote:
>>
>> Hi
>>
>> How to deploy a specific branch or tag or even a specific revision
>> into
>> a capistrano release ?
>> The problem also is that I've setup the svn repository from the trunk
>> (like everybody does I guess) with:
>>
>> set :repository,
>> Proc.new { "--username \\"#{svn_user}\\" " +
>> "--password \\"#{svn_password}\\" " +
>> "http://svn.foo.com/#{application}/trunk/" }
>>
>> Thanks for your help
>>
>>
>> >
Capistrano supports setting variables on the command line using the -
S command. I have something like the following in all my deploy.rb:
===
set :stage, "staging" unless variables[:stage]
case stage
when "staging"
set :domain, "app.staging"
set :repository, "http://svn/app/trunk" unless variables[:repo]
set :rails_env, "staging"
set :app_server, "staging"
when "production"
set :domain, "app.com"
set :repository, "http://svn/app/tags/2007010801" unless variables
[:repo]
set :rails_env, "production"
set :app_server, "prod"
end
#.... the rest of deploy.rb
===
As part of preparing a new release, I always update the repository
tag in the production stanza. This also makes it a conscious effort
to deploy to production.