summaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-08-19 02:55:41 +0200
committerLuke Kanies <luke@madstop.com>2008-08-19 02:55:41 +0200
commitbc35a3b98215e8bfd384a869edd05fe640ac95dd (patch)
tree2417ee9ab80494d5812b9fe8f23155d6652bac85 /Rakefile
parentd24504e83acd0bf210fb643d6c9f0cc2e6eae6c0 (diff)
downloadfacter-bc35a3b98215e8bfd384a869edd05fe640ac95dd.tar.gz
facter-bc35a3b98215e8bfd384a869edd05fe640ac95dd.tar.xz
facter-bc35a3b98215e8bfd384a869edd05fe640ac95dd.zip
Adding a rake task for creating an archive.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile6
1 files changed, 6 insertions, 0 deletions
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