Skip to content
Henrik edited this page Aug 21, 2014 · 1 revision

Package files into a ZIP archive.

zip :zip => [:build] do |zip|
  zip.dirs = ["lib", "spec"]
  zip.files = ["README.md"]
  zip.output_path = "out/source.zip"
  zip.exclusions = [/_PublishedWebsites/, /\.pdb$/]
end

Required Parameters

Output Path

The location for the resulting ZIP archive.

output_path = "out/source.zip"

Optional Parameters

Dirs

The directories to be included in this archive (all files, recursively)

dirs = ["lib", "spec"]

Files

There are times when you need to include other files, like release notes.

files = ["README.md", "LICENSE"]

Exclusions

Exclude files matching one of the given exclusion pattern, including static paths, glob patterns, and Regexps.

exclusions = [/_PublishedWebsites/, /\.pdb$/]

Flatten

Ignore the directory structure of the input directories.

flatten

Guidance

(none)

Clone this wiki locally