-
Notifications
You must be signed in to change notification settings - Fork 63
Output
The output task is the declarative way to state all of your typical file operations. For example, when you're creating the zip-able or redistributable package. Typically this step uses FileUtil, mv's, cp's.
desc "Prepare project output for publishing"
output :out => [:build, :test] do |out|
out.from "bin/Release"
out.to "out"
out.dir "MyWebService"
out.file "legal/LICENSE.txt", :as => "LICENSE"
out.file "README.md"
out.file "VERSION"
endThe base directories to copy from and to, used in conjunction with the file and dir methods. The output task will create any path that it needs.
from "bin/Release"
to "out"The files and directories to copy from the base from directory into the base to directory. You can rename the file or flatten the path by providing an :as option.
dir "MyWebService"
file "README.md"
file "legal/LICENSE.txt", :as => "LICENSE"Do not overwrite files in the destination.
preserveTransform ERB templates, as an alternative to the XML transformations provided by the Microsoft tooling.
erb "template.config", :as => "other.config", :locals => {:password => "xyz"}Be very careful with this task. Try not to use it to move files to remote shares or anything. It essentially runs rm -rf <destination> if you do not specify preserve. Test it locally, a lot.