Added a packagetask.
[redact.git] / Rakefile
index 8a74e3316dcdbf18843a74cad071c2b22699f323..1e4d36cede14c8b58fde641955c13ee931170067 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,7 +1,13 @@
-# $Id: Rakefile 8 2005-03-28 18:11:12Z tilman $
+# $Id: Rakefile 11 2005-03-28 21:00:30Z tilman $
 
 require "rake/clean"
 require "rake/testtask"
+require "rake/rdoctask"
+require "rake/packagetask"
+
+PKG_NAME = "redact"
+PKG_VERSION = `grep VERSION lib/redact/redact.rb`.
+              match(/VERSION = \"(.*)\"/).captures.first
 
 CLOBBER.include(FileList["test/*.edj"])
 
@@ -30,3 +36,18 @@ Rake::TestTask.new do |t|
        t.test_files = FileList["test/test*.rb"]
        t.verbose = true
 end
+
+Rake::RDocTask.new do |t|
+       t.rdoc_dir = "doc"
+       t.title = "Redact - An Edje Compiler written in Ruby"
+       t.options = ["--line-numbers", "--inline-source", "--main", "README"]
+       t.rdoc_files.include("README", "COPYING", "AUTHORS", "ChangeLog",
+                            "TODO", "lib/redact/redact.rb",
+                            "lib/redact/part.rb", "lib/redact/program.rb")
+end
+
+Rake::PackageTask.new(PKG_NAME, PKG_VERSION) do |t|
+       t.need_tar_gz = true
+       t.package_files.include("[A-Z]*", "bin/redact", "lib/redact/*.rb",
+                               "test/*.rb")
+end