mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
move stage and DSL to setup
This commit is contained in:
parent
18a4d13988
commit
83f7dd8e96
4 changed files with 13 additions and 26 deletions
10
lib/capistrano/setup.rb
Normal file
10
lib/capistrano/setup.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
include Capistrano::DSL
|
||||
|
||||
stages.each do |stage|
|
||||
Rake::Task.define_task(stage) do
|
||||
load "config/deploy/#{stage}.rb"
|
||||
set(:stage, stage.to_sym)
|
||||
configure_ssh_kit
|
||||
end
|
||||
end
|
||||
|
|
@ -1,14 +1,3 @@
|
|||
include Capistrano::DSL
|
||||
|
||||
|
||||
stages.each do |stage|
|
||||
Rake::Task.define_task(stage) do
|
||||
load "config/deploy/#{stage}.rb"
|
||||
set(:stage, stage.to_sym)
|
||||
configure_ssh_kit
|
||||
end
|
||||
end
|
||||
|
||||
namespace :deploy do
|
||||
|
||||
desc "starting"
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env cap
|
||||
# loads dsl, sets up stages
|
||||
require 'capistrano/setup'
|
||||
|
||||
# require bundled deployment tasks
|
||||
# remove to start from scratch
|
||||
require 'capistrano/deploy'
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env cap
|
||||
require 'capistrano/install'
|
||||
|
||||
# Loads configuation
|
||||
load 'config/deploy.rb'
|
||||
|
||||
# require bundled deployment tasks
|
||||
require 'capistrano/deploy'
|
||||
|
||||
# require tasks from contrib gems
|
||||
# require 'capistrano/rails'
|
||||
# require 'capistrano/heroku'
|
||||
|
||||
# Loads any rake tasks from lib/deploy/tasks
|
||||
Dir.glob('lib/deploy/tasks/*.rake').each { |r| import r }
|
Loading…
Add table
Reference in a new issue