From bc35a3b98215e8bfd384a869edd05fe640ac95dd Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 19 Aug 2008 02:55:41 +0200 Subject: Adding a rake task for creating an archive. Signed-off-by: Luke Kanies --- Rakefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 619bf47..0968c1f 100644 --- a/Rakefile +++ b/Rakefile @@ -48,3 +48,9 @@ if project.has?(:epm) task.rubylibs = FileList.new('lib/**/*') end end + +task :archive do + raise ArgumentError, "You must specify the archive name by setting ARCHIVE; e.g., ARCHIVE=1.5.1rc1" unless archive = ENV["ARCHIVE"] + + sh "git archive --format=tar --prefix=facter-#{archive}/ HEAD | gzip -c > facter-#{archive}.tgz" +end -- cgit