简体   繁体   English

Ruby on Rails Capistrano无需部署即可更新代码

[英]Ruby on Rails Capistrano to update the code without deployment

Am looking for Capistrano Geek to reduce the Deployment time & process. 我正在寻找Capistrano Geek以减少部署时间和过程。

everyone knows how the capistrano is working, its always Clone code to the target server and keep the code as release directory & create a symblink to current directory. 每个人都知道capistrano的工作方式,它始终将代码克隆到目标服务器,并将代码保留为发布目录,并创建到当前目录的符号链接。

Here am looking for Git pull request, in ROR if I made any changes like Changing the Caption, updating text means I dont want to deploy the whole application again. 这里正在寻找Git拉取请求,如果我进行了诸如更改标题之类的任何更改,则在ROR中进行更新,这意味着我不想再次部署整个应用程序。

I simply need to update the code which has minimum changes 我只需要更新更改最少的代码

For that I have to use Git pull to update the changes & Git pull is not working in the Capistrano 为此,我必须使用Git拉动来更新更改,并且Git拉动在Capistrano中不起作用

I directly ran git pull in the release path I got error only. 我直接在发布路径中运行了git pull,但仅收到错误消息。

Could anyone has solution for this pls post & my sample code is show below. 谁能为这个请贴提供解决方案,我的示例代码如下所示。

desc "Update the deployed code."
 task :update_code
   execute "/usr/bin/git pull origin #{fetch(:release_path)}")
   end
 end

Capistrano uses git archive to create the release copy of the repo. Capistrano使用git archive来创建仓库的发行版本。 This does not include the .git/ directory, so further git commands will not work. 这不包括.git/目录,因此进一步的git命令将不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM