2011-12-13 93 views
0

所有capistrano文档似乎暗示有一个默认命名空间“部署”与一些标准任务,如安装程序,update_code,重新启动等,但是当我做cap -T它只显示我已经定义的任务和不是部署任务。我是否需要执行其他任何操作来启用部署任务?我使用Capistrano的版本2.9.0Capistrano部署命名空间

回答

1

你有一个项目中的根总监名为Capfile文件ÿ? 矿山如下

load 'deploy' if respond_to?(:namespace) # cap2 differentiator 
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } 
load 'config/deploy' 
+0

我没有使用capify生成Capfile因此它没有你提到的线条。在添加这些线路的时候, – randomuser

2

MBP:CMS bladeyu [大师] $帽-T

cap bundle:install   # Install the current Bundler environment. 
cap deploy     # Deploys your project. 
cap deploy:assets:clean  # Run the asset clean rake task. 
cap deploy:assets:precompile # Run the asset precompilation rake task. 
cap deploy:check    # Test deployment dependencies. 
cap deploy:cleanup   # Clean up old releases. 
cap deploy:cold    # Deploys and starts a `cold' application. 
cap deploy:migrate   # Run the migrate rake task. 
cap deploy:migrations  # Deploy and run pending migrations. 
cap deploy:pending   # Displays the commits since your last deploy. 
cap deploy:pending:diff  # Displays the `diff' since your last deploy. 
cap deploy:rollback   # Rolls back to a previous version and restarts. 
cap deploy:rollback:code  # Rolls back to the previously deployed version. 
cap deploy:setup    # Prepares one or more servers for deployment. 
cap deploy:symlink   # Updates the symlink to the most recently deplo... 
cap deploy:update   # Copies your project and updates the symlink. 
cap deploy:update_code  # Copies your project to the remote servers. 
cap deploy:upload   # Copy files to the currently deployed version. 
cap deploy:web:disable  # Present a maintenance page to visitors. 
cap deploy:web:enable  # Makes the application web-accessible again. 
cap invoke     # Invoke a single command on the remote servers. 
cap shell     # Begin an interactive Capistrano session. 
cap whenever:clear_crontab # Clear application's crontab entries using When... 
cap whenever:update_crontab # Update application's crontab entries using Whe... 


Some tasks were not listed, either because they have no description, 
or because they are only used internally by other tasks. To see all 
tasks, type `cap -vT'. 

Extended help may be available for these tasks. 
Type `cap -e taskname' to view it. 

MBP:CMS bladeyu [大师] $宝石列表Capistrano的

*** LOCAL GEMS *** 

capistrano (2.9.0) 

MBP: CMS bladeyu [大师] $帽-vT

cap assets:cleanup   # 
cap assets:precompile  # 
cap assets:redigest   # 
cap bundle:install   # Install the current Bundler environment. 
cap custom_symlink   # 
cap deploy     # Deploys your project. 
cap deploy:assets:clean  # Run the asset clean rake task. 
cap deploy:assets:precompile # Run the asset precompilation rake task. 
cap deploy:assets:symlink # [internal] This task will set up a symlink to ... 
cap deploy:check    # Test deployment dependencies. 
cap deploy:cleanup   # Clean up old releases. 
cap deploy:cold    # Deploys and starts a `cold' application. 
cap deploy:finalize_update # [internal] Touches up the released code. 
cap deploy:migrate   # Run the migrate rake task. 
cap deploy:migrations  # Deploy and run pending migrations. 
cap deploy:pending   # Displays the commits since your last deploy. 
cap deploy:pending:diff  # Displays the `diff' since your last deploy. 
cap deploy:restart   # 
cap deploy:rollback   # Rolls back to a previous version and restarts. 
cap deploy:rollback:cleanup # [internal] Removes the most recently deployed ... 
cap deploy:rollback:code  # Rolls back to the previously deployed version. 
cap deploy:rollback:revision # [internal] Points the current symlink at the p... 
cap deploy:setup    # Prepares one or more servers for deployment. 
cap deploy:start    # 
cap deploy:stop    # 
cap deploy:symlink   # Updates the symlink to the most recently deplo... 
cap deploy:update   # Copies your project and updates the symlink. 
cap deploy:update_code  # Copies your project to the remote servers. 
cap deploy:upload   # Copy files to the currently deployed version. 
cap deploy:web:disable  # Present a maintenance page to visitors. 
cap deploy:web:enable  # Makes the application web-accessible again. 
cap invoke     # Invoke a single command on the remote servers. 
cap precompile_trace   # 
cap setup_file_tree   # 
cap shell     # Begin an interactive Capistrano session. 
cap whenever:clear_crontab # Clear application's crontab entries using When... 
cap whenever:update_crontab # Update application's crontab entries using Whe... 

Extended help may be available for these tasks. 
Type `cap -e taskname' to view it. 
+0

感谢这个漂亮的提示..我正在寻找其他的东西,得到了这个.. –