mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
auto load scm tasks based on :scm value
This commit is contained in:
parent
a7a9ce8a0f
commit
1c65d210ad
3 changed files with 5 additions and 3 deletions
|
@ -13,7 +13,6 @@ TODO:
|
|||
|
||||
- [x] basic configuration object
|
||||
- [x] basic 'capistrano/deploy' noop example
|
||||
- [x] don't care too much about testing at this point (rspec included for my reference)
|
||||
|
||||
- [x] before/after task hooks
|
||||
- [x] handle multi stage
|
||||
|
@ -31,9 +30,11 @@ TODO:
|
|||
- [x] basic rollback
|
||||
- [x] support primary servers `on primary :db`
|
||||
- [x] rails specific tasks (see [here](https://github.com/seenmyfate/capistrano-rails))
|
||||
- [ ] auto load tasks for scm based on variable
|
||||
- [x] auto load tasks for scm based on variable
|
||||
- [ ] run locally
|
||||
- [ ] better descriptions for tasks
|
||||
- [ ] add examples to README
|
||||
- [ ] add task packaging run through
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ stages.each do |stage|
|
|||
Rake::Task.define_task(stage) do
|
||||
load "config/deploy.rb"
|
||||
load "config/deploy/#{stage}.rb"
|
||||
load "capistrano/#{fetch(:scm)}.rb"
|
||||
set(:stage, stage.to_sym)
|
||||
configure_backend
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
set :application, 'my app name'
|
||||
set :repo, 'git@example.com:me/my_repo.git'
|
||||
|
||||
ask :branch, Proc.new { `git rev-parse --abbrev-ref HEAD`.chomp }
|
||||
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
|
||||
|
||||
# set :deploy_to, '/var/www/my_app'
|
||||
# set :scm, :git
|
||||
|
|
Loading…
Reference in a new issue