Created
April 23, 2010 13:50
-
-
Save koseki/376556 to your computer and use it in GitHub Desktop.
Capistrano Minimal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir.chdir(File.dirname(__FILE__)) | |
# load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
# Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'capistrano/ext/multistage' | |
set :default_stage, "staging" | |
namespace :deploy do | |
desc "デプロイを実行します。" | |
task :default do | |
svn.update | |
end | |
end | |
namespace :svn do | |
desc "svn updateを実行します。" | |
task :update do | |
run "svn update #{deploy_to}" | |
end | |
desc "svn diffを実行します。" | |
task :diff do | |
run "svn diff #{deploy_to}" | |
end | |
desc "svn status -uを実行します。" | |
task :status do | |
run "svn status -u #{deploy_to}" | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :domain, "live.example.com" | |
set :user, "example" # sshログインユーザ名 | |
set :deploy_to, "/home/#{user}/path/to/deploy" | |
role :app, "#{domain}" | |
# ssh踏み台サーバ | |
# set :gateway, "gateway.example.com" | |
# set :gateway, "[email protected]" | |
puts <<'EOT' | |
-------------------------------------------------------------------------------- | |
_ _ _ | |
__/\__ | (_)_ _____| | __/\__ | |
\ / | | \ \ / / _ \ | \ / | |
/_ _\ | | |\ V / __/_| /_ _\ | |
\/ |_|_| \_/ \___(_) \/ | |
your app name | |
-------------------------------------------------------------------------------- | |
EOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :domain, "staging.example.com" | |
set :user, "example" # sshログインユーザ名 | |
set :deploy_to, "/home/#{user}/path/to/deploy" | |
role :app, "#{domain}" | |
# ssh踏み台サーバ | |
# set :gateway, "gateway.example.com" | |
# set :gateway, "[email protected]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment