Created
November 16, 2012 08:31
-
-
Save tomraithel/4085483 to your computer and use it in GitHub Desktop.
RUBY: A Rakefile for creating a zip from files within a directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake/packagetask' | |
namespace :my_namespace do | |
desc "Make coffee" | |
task :make_coffee do | |
cups = ENV["COFFEE_CUPS"] || 2 | |
puts "Made #{cups} cups of coffee. Shakes are gone." | |
end | |
# see http://rake.rubyforge.org/classes/Rake/PackageTask.html | |
Rake::PackageTask.new("all_jpgs", "0.0.1") do |p| | |
p.need_zip = true | |
p.package_files.include("**/*.jpg") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment