Gerold,
How about this:
staging.rb
-------------
set :load_files, ['file1', 'file2']
deploy.rb
-------------
def setting()
load_files.each { |recipe| load(File.join("config", "deploy",
"setup", recipe))
end
before :deploy, setting
(untested)
HTH
Rory
On 9 February 2010 15:47, Gerold Böhler <[email protected]> wrote:
> require 'capistrano/ext/multistage'
> set :application, "www.example.com"
> set :stages, %w(staging production)
> set :default_stage, "staging"
> task :production do
> setting(["file1", "file2"])
> end
> task :staging do
> setting(["file1", "file2", "file3"])
> end
> def setting(files)
> files.each { |recipe| load(File.join("config", "deploy", "setup", recipe))
> }
> end
> This is my deploy.rb now, maybe you get an idea of what i want to do here.
> Basically i just want to load different files depending on the stage.
> Thanks for your time,
> Gerold
>
> On Feb 9, 2010, at 2:14 PM, Lee Hambley wrote:
>
> task :production do
> role :web, 'example.com'
> end
>
> task :staging do
> role :web, 'whatever.com'
> end
>
> $ cap production deploy
> # Vs.
> $ cap staging deploy
>
> As you can see, they're just tasks that set variables, so they're not
> special tasks that can modify the `environment` of the running process,
> rather simply magic tasks (and the multistage gem comes with extra
> protection against forgetting a few things) - but that's it in a nutshell.
>
> -- Lee Hambley
>
> Twitter: @leehambley | @capistranorb
>
>
> --
> * 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
--
* 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