lib/alpha_omega/deploy.rb in alpha_omega-1.4.1 vs lib/alpha_omega/deploy.rb in alpha_omega-1.4.2

- old
+ new

@@ -32,14 +32,17 @@ # These variables may be set in the client capfile if their default values # are not sufficient. # ========================================================================= _cset :skip_scm, false + _cset :skip_notifications, false + _cset :skip_performance, true + _cset :skip_performance_task, "" _cset :scm, :git _cset :deploy_via, :checkout _cset(:branch) { AlphaOmega.what_branch } - _cset(:revision) { source.head } + _cset(:revision) { ENV['FLAGS_tag'] || source.head } _cset :default_shell, "/bin/bash" _cset(:deploy_to) { "/data/#{application}" } _cset :root_user, "root" @@ -51,10 +54,11 @@ _cset :ruby_loader, "" _cset(:run_method) { fetch(:use_sudo, true) ? :sudo : :run } _cset :last_pod, nil + _cset :success, false _cset (:figlet) { [%x(which figlet).strip].reject {|f| !(File.executable? f)}.first || echo } # ========================================================================= # services, logs @@ -303,16 +307,14 @@ servers. You will rarely call this task directly, however; instead, you \ should call the `deploy' task (to do a complete deploy) or the `update' \ task (if you want to perform the `restart' task separately). DESC task :update_code do - strategy.deploy! unless skip_scm + scm bundle - unless deploy_path_name == migrate_path_name - build - dist - end + build + dist end task :symlink_next do if releases.length >= 2 run "ln -nfs #{current_release} #{next_path}.new" @@ -402,10 +404,13 @@ Distribute binaries built in deploy:build. DESC task :dist do end + task :scm do + strategy.deploy! unless skip_scm + end desc <<-DESC Checkpoint for various language bundlers DESC task :bundle do @@ -613,12 +618,17 @@ if want_unlock run "rm -f #{lock_path}" end end - task :finished do + task :successful, :only => { :primary => true } do + set :success, true + run_locally"#{figlet} success | perl -pe 's{( +)}{chr(46) x length($1)}e'" end + task :finished do + successful + end end # :deploy end # Capistrano::Configuration require 'alpha_omega/config/deploy'