排除使用Capistrano部署的文件,同时仍然使用Git进行版本控制 [英] Excluding files from being deployed with Capistrano while still under version control with Git
问题描述
截至2013年8月30日,您可以简单地创建一个 .gitattributes
文件和 export-ignore
您选择的文件/文件夹。
features / export-ignore
spec / export-ignore
参考: https://github.com/ capistrano / capistrano / pull / 626
I want to start testing the JavaScript in my Rails apps with qUnit and I'm wondering how to keep the test JavaScript and test runner HTML page under version control (I'm using Git, of course) but keep them off the production server when I deploy the app with Capistrano. My first thought is to let Capistrano send all the code over as usual including the test files, and write a task to delete them at the end of the deployment process. This seems like sort of a hack, though. Is there a cleaner way to tell Capistrano to ignore certain parts of the repository when deploying?
As of August 30th, 2013, you can simply create a .gitattributes
file and export-ignore
the files/folders of your choice.
features/ export-ignore
spec/ export-ignore
Reference: https://github.com/capistrano/capistrano/pull/626
这篇关于排除使用Capistrano部署的文件,同时仍然使用Git进行版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!