我从本教程中获取的 deploy.rb 文件中有以下内容,除了命令之外,一切都完全正常touch
。
有谁知道为什么这可能不起作用?
set :application, "your-application-name"
set :repository, "git@github.com:you/your-project.git"
set :scm, :git
set :deploy_to, "/home/path/to/project/"
set :use_sudo, false
set :deploy_via, :remote_cache
set :copy_exclude, [".git", ".DS_Store", ".gitignore", ".gitmodules"]
server "example.org", :app
namespace :myproject do
task :symlink, :roles => :app do
run "ln -nfs #{shared_path}/uploads #{release_path}/application/wp-content/uploads"
run "touch #{release_path}/env_production"
end
end
after "deploy:create_symlink", ":after_deploy"
上限部署的输出
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@github.com:jeffreynolte/Testing-WP-Workflow.git HEAD"
* executing "if [ -d /var/www/domain.com/subdomains/wp-workflow/shared/cached-copy ]; then cd /var/www/domain.com/subdomains/wp-workflow/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 8c10e1f459dc78a127681362386bb84d5fbf3662 && git clean -q -d -x -f; else git clone -q git@github.com:jeffreynolte/Testing-WP-Workflow.git /var/www/domain.com/subdomains/wp-workflow/shared/cached-copy && cd /var/www/domain.com/subdomains/wp-workflow/shared/cached-copy && git checkout -q -b deploy 8c10e1f459dc78a127681362386bb84d5fbf3662; fi"
servers: ["domain.com"]
[domain.com] executing command
command finished in 3905ms
copying the cached version to /var/www/domain.com/subdomains/wp-workflow/releases/20121026041737
* executing "rsync -lrpt --exclude=\".git\" --exclude=\".DS_Store\" --exclude=\".gitignore\" --exclude=\".gitmodules\" /var/www/domain.com/subdomains/wp-workflow/shared/cached-copy/ /var/www/domain.com/subdomains/wp-workflow/releases/20121026041737 && (echo 8c10e1f459dc78a127681362386bb84d5fbf3662 > /var/www/domain.com/subdomains/wp-workflow/releases/20121026041737/REVISION)"
servers: ["domain.com"]
[domain.com] executing command
command finished in 577ms
* executing `deploy:finalize_update'
* executing "chmod -R g+w /var/www/domain.com/subdomains/wp-workflow/releases/20121026041737"
servers: ["domain.com"]
[domain.com] executing command
command finished in 51ms
* executing `deploy:symlink'
* executing "rm -f /var/www/domain.com/subdomains/wp-workflow/current && ln -s /var/www/domain.com/subdomains/wp-workflow/releases/20121026041737 /var/www/domain.com/subdomains/wp-workflow/current"
servers: ["domain.com"]
[domain.com] executing command
command finished in 45ms
** transaction: commit