diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-11 21:35:01 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-11 21:35:01 +0000 |
commit | 9cadc95b28da1cf6ca8f802292d12cc96a4f2c2d (patch) | |
tree | 73280968d3426b31c5d0b9da1d3e558aa6f9fcb9 /lib/rake/packagetask.rb | |
parent | 52c1331763d8b9b8d6362987e6f8847b65ed7f57 (diff) | |
download | ruby-9cadc95b28da1cf6ca8f802292d12cc96a4f2c2d.tar.gz |
* NEWS (with all sufficient information):
* lib/rake: Update to rake 10.1.0
* bin/rake: ditto.
* test/rake: ditto.
* NEWS: Update NEWS to include rake 10.1.0 and links to release notes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rake/packagetask.rb')
-rw-r--r-- | lib/rake/packagetask.rb | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb index 08c1a8c025..029caa6d49 100644 --- a/lib/rake/packagetask.rb +++ b/lib/rake/packagetask.rb @@ -51,13 +51,16 @@ module Rake # Directory used to store the package files (default is 'pkg'). attr_accessor :package_dir - # True if a gzipped tar file (tgz) should be produced (default is false). + # True if a gzipped tar file (tgz) should be produced (default is + # false). attr_accessor :need_tar - # True if a gzipped tar file (tar.gz) should be produced (default is false). + # True if a gzipped tar file (tar.gz) should be produced (default + # is false). attr_accessor :need_tar_gz - # True if a bzip2'd tar file (tar.bz2) should be produced (default is false). + # True if a bzip2'd tar file (tar.bz2) should be produced (default + # is false). attr_accessor :need_tar_bz2 # True if a zip file should be produced (default is false) @@ -121,7 +124,8 @@ module Rake ].each do |(need, file, flag)| if need task :package => ["#{package_dir}/#{file}"] - file "#{package_dir}/#{file}" => [package_dir_path] + package_files do + file "#{package_dir}/#{file}" => + [package_dir_path] + package_files do chdir(package_dir) do sh %{#{@tar_command} #{flag}cvf #{file} #{package_name}} end @@ -131,7 +135,8 @@ module Rake if need_zip task :package => ["#{package_dir}/#{zip_file}"] - file "#{package_dir}/#{zip_file}" => [package_dir_path] + package_files do + file "#{package_dir}/#{zip_file}" => + [package_dir_path] + package_files do chdir(package_dir) do sh %{#{@zip_command} -r #{zip_file} #{package_name}} end @@ -145,7 +150,7 @@ module Rake @package_files.each do |fn| f = File.join(package_dir_path, fn) fdir = File.dirname(f) - mkdir_p(fdir) if !File.exist?(fdir) + mkdir_p(fdir) unless File.exist?(fdir) if File.directory?(fn) mkdir_p(f) else |