Class

PackageTask

Extends:

Create a packaging task that will package the project into distributable files (e.g zip archive or tar files).

The PackageTask will create the following targets:

:package
Create all the requested package files.
:clobber_package
Delete all the package files. This target is automatically added to the main clobber target.
:repackage
Rebuild the package files from scratch, even if they are not out of date.
"package_dir/name-version.tgz"
Create a gzipped tar package (if need_tar is true).
"package_dir/name-version.tar.gz"
Create a gzipped tar package (if need_tar_gz is true).
"package_dir/name-version.tar.bz2"
Create a bzip2’d tar package (if need_tar_bz2 is true).
"package_dir/name-version.zip"
Create a zip package archive (if need_zip is true).

Example:

Rake::PackageTask.new("rake", "1.2.3") do |p|
  p.need_tar = true
  p.package_files.include("lib/**/*.rb")
end
Public Attributes
name Name of the package (from the GEM Spec).
need_tar True if a gzipped tar file (tgz) should be produced (default is false).
need_tar_bz2 True if a bzip2’d tar file (tar.bz2) should be produced (default is false).
need_tar_gz True if a gzipped tar file (tar.gz) should be produced (default is false).
need_zip True if a zip file should be produced (default is false)
package_dir Directory used to store the package files (default is ‘pkg’).
package_files List of files to be included in the package.
tar_command Tar command for gzipped or bzip2ed archives. The default is ‘tar’.
version Version of the package (e.g. ‘1.3.2’).
zip_command Zip command for zipped archives. The default is ‘zip’.
Public Methods
define Create the tasks defined by this task library.
init Initialization that bypasses the "yield self" and "define" step.
new Create a Package Task with the given name and version.
package_dir_path
package_name
tar_bz2_file
tar_gz_file
tgz_file
zip_file
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.