Class Buildr::TarTask
In: lib/buildr/packaging/tar.rb  (CVS)
Parent: ArchiveTask

The TarTask creates a new Tar file. You can include any number of files and and directories, use exclusion patterns, and include files into specific directories.

To create a GZipped Tar, either set the gzip option to true, or use the .tgz or .gz suffix.

For example:

  tar("test.tgz").tap do |task|
    task.include "srcs"
    task.include "README", "LICENSE"
  end

See Buildr#tar and ArchiveTask.

Methods

Attributes

gzip  [RW]  To create a GZipped Tar, either set this option to true, or use the .tgz/.gz suffix.
mode  [RW]  Permission mode for files contained in the Tar. Defaults to 0755.

Public Instance methods

Returns a Tar file entry. You can use this to check if the entry exists and its contents, for example:

  package(:tar).entry("src/LICENSE").should contain(/Apache Software License/)

Yields an Archive::Tar::Minitar::Input object to the provided block. Opening, closing and Gzip-decompressing is automatically taken care of.

[Validate]