diff --git a/Capfile b/Capfile index 11af883..6ad9a5a 100644 --- a/Capfile +++ b/Capfile @@ -1,3 +1,20 @@ -load 'deploy' -load 'deploy/assets' -load 'config/deploy' \ No newline at end of file +# Load DSL and set up stages +require 'capistrano/setup' + +# Include default deployment tasks +require 'capistrano/deploy' +require 'capistrano/rbenv' +require 'capistrano/bundler' +require 'capistrano/rails/assets' +require 'capistrano/rails/migrations' + +namespace :deploy do + desc 'Start application' + task(:start) {} + + desc 'Stop application' + task(:stop) {} +end + +# Load custom tasks from `lib/capistrano/tasks' if you have any defined +Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } \ No newline at end of file diff --git a/config/deploy.rb b/config/deploy.rb index 28d9457..c98443b 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -19,15 +19,5 @@ set :bundle_without, %w{development test}.join(' ') set :linked_dirs, fetch(:linked_dirs, []).push('bin', 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system') namespace :deploy do - desc "Make sure local git is in sync with remote." - task :check_revision, roles: :web do - unless `git rev-parse HEAD` == `git rev-parse origin/master` - puts "WARNING: HEAD is not the same as origin/master" - puts "Run `git push` to sync changes." - exit - end - end - before "deploy", "deploy:check_revision" - after :publishing, :restart end \ No newline at end of file