Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 排除Capistrano要部署的文件_Ruby_Capistrano - Fatal编程技术网

Ruby 排除Capistrano要部署的文件

Ruby 排除Capistrano要部署的文件,ruby,capistrano,Ruby,Capistrano,我从git部署了capistrano的项目 有些文件存储在git中,但不希望复制到部署服务器 在git中,文件结构 myapp - mainapp - somesetting.txt - _NoWanttoDeploy.txt // I don't want to deploy this file 这些是deploy.rb # config valid for current version and patch releases of Capis

我从git部署了capistrano的项目

有些文件存储在git中,但不希望复制到部署服务器

在git中,文件结构

myapp     - mainapp
          - somesetting.txt
          - _NoWanttoDeploy.txt // I don't want to deploy this file
这些是deploy.rb

# config valid for current version and patch releases of Capistrano
lock "~> 3.11.2"

set :application, "myapp"
set :repo_url, "ssh://app@git.example.com/~/myGit/myapp.git"

set :branch, 'master'
set :deploy_to, "/var/www/html/myapp"

set :linked_dirs, fetch(:linked_dirs, []).push('static')

set :keep_releases, 3
如何设置???如何设置


任何与PHP相关的东西?我部署了PHP和python项目,但它可能与PHP本身无关,我将删除标记。不知何故,
copy\u exclude
不起作用。我在谷歌上搜索发现了同样的情况,所以我放弃了使用
copy\u exclude
。使用
namespace:deploy do desc'mytest'任务:mydelete do on roles(:app)do执行“rm-rf/var/www/html/myapp/current/_NoDeploy”end-after:publishing,:mydelete end
,但非常感谢您的评论。
set :copy_exclude, "_NoWanttoDeploy.txt"