Class: Buildr::TarTask

Inherits:
ArchiveTask show all
Defined in:
lib/buildr/packaging/tar.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ArchiveTask

#clean, #contain?, #empty?, #exclude, #include, #invoke_prerequisites, #merge, #needed?, #path, #root, #with

Methods inherited from Rake::FileTask

#contain?, #empty?, #exist?

Constructor Details

#initialize(*args, &block) ⇒ TarTask

:nodoc:



42
43
44
45
46
# File 'lib/buildr/packaging/tar.rb', line 42

def initialize(*args, &block) #:nodoc:
  super
  self.gzip = name =~ /\.[t?]gz$/
  self.mode = '0755'
end

Instance Attribute Details

#gzipObject

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



38
39
40
# File 'lib/buildr/packaging/tar.rb', line 38

def gzip
  @gzip
end

#modeObject

Permission mode for files contained in the Tar. Defaults to 0755.



40
41
42
# File 'lib/buildr/packaging/tar.rb', line 40

def mode
  @mode
end