排除 Capistrano 部署的文件
Exclude the files to deploy by Capistrano
我通过 capistrano 从 git 部署了该项目。
有些文件存储在 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
如何设置???
copy_exclude怎么样?
set :copy_exclude, "_NoWanttoDeploy.txt"
我通过 capistrano 从 git 部署了该项目。
有些文件存储在 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
如何设置???
copy_exclude怎么样?
set :copy_exclude, "_NoWanttoDeploy.txt"