Skip to content

Instantly share code, notes, and snippets.

@tomraithel
Created November 16, 2012 08:31
Show Gist options
  • Save tomraithel/4085483 to your computer and use it in GitHub Desktop.
Save tomraithel/4085483 to your computer and use it in GitHub Desktop.
RUBY: A Rakefile for creating a zip from files within a directory
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