我希望有人可以帮助我,我将进入通过 capistrano 部署站点的第一次体验,但是,每当我运行时,cap deploy:check
我都会收到错误,任务“暂存”不存在,问题是什么?
这是我的 deploy.rb
set :application, "Myproject"
set :repository, "******@bitbucket.org/simonainley/myproject.git"
set :scm, :git
set :ssh_options, {:forward_agent =>true}
set :stages, %w(staging production)
set :default_stage, "staging"
require 'capistrano/ext/miltistage'
这是我的 staging.rb
role :server, "**.**.**.***"
set :user, "user"
set :password, "password"
set :branch, "dev"
set :web_directory, "/home/***/public_html/staging/****"
namespace :deploy do |
desc "Deploys code to the staging enviroment."
task :default_stage, :roles => :server, :except => {:;no_release => true}
run [
"cd #{web_directory}",
"git reset --hard",
"git checkout #{branch}",
"git fetch",
"git pull origin #{branch}" ].join("; ")
end
end
我假设我缺少设置或变量?