X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=Rakefile;h=3e47175a8ecd41c0e3a528d8b37b459955aa6964;hb=07b4660cebea81f31bfa0b47981a7e06fe35ef1f;hp=d6bf235f26b39042029d0036d6b597b6c137be29;hpb=f6f4a65da2b2d80d6650a10ae8981346dff3d3ff;p=redact.git diff --git a/Rakefile b/Rakefile index d6bf235..3e47175 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,4 @@ -# $Id: Rakefile 12 2005-03-28 21:06:34Z tilman $ +# $Id: Rakefile 34 2005-04-25 17:12:29Z tilman $ require "rake/clean" require "rake/testtask" @@ -7,9 +7,14 @@ require "rake/packagetask" require "rake/contrib/compositepublisher.rb" require "rake/contrib/sshpublisher" +# make sure we run at least Rake 0.5.0 +if (RAKEVERSION.split(".").map { |p| p.to_i } <=> [0, 5, 0]) < 0 + raise("Rake 0.5.0 or greater required") +end + PKG_NAME = "redact" -PKG_VERSION = `grep VERSION lib/redact/redact.rb`. - match(/VERSION = \"(.*)\"/).captures.first +PKG_VERSION = File.read("lib/redact/redact.rb"). + match(/^\s*VERSION = \"(.*)\"\s*$/).captures.first CLOBBER.include(FileList["test/*.edj"]) @@ -24,11 +29,8 @@ task :install do |t| ddir = destdir + sitelibdir + "/redact" FileUtils::Verbose.mkdir(ddir) unless File.directory?(ddir) - - ["app", "part", "program", "redact"].each do |file| - FileUtils::Verbose.install("lib/redact/#{file}.rb", ddir, - :mode => 0644) - end + FileUtils::Verbose.install(Dir["lib/redact/*.rb"], ddir, + :mode => 0644) end task :test @@ -44,7 +46,7 @@ Rake::RDocTask.new do |t| 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", + "TODO", "NEWS", "lib/redact/redact.rb", "lib/redact/part.rb", "lib/redact/program.rb") end