X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=Rakefile;h=14901ca220a0551062c47393a2a9497e864119bc;hb=e0e880a9a7503d2df9a2413d5e7440b8a8cc4f1f;hp=c94f6cf0efc951e3ed144fe2da15d1e4e16c67f1;hpb=7ffd114233c686568f43c88d79699c2921893ace;p=redact.git diff --git a/Rakefile b/Rakefile index c94f6cf..14901ca 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,3 @@ -# $Id: Rakefile 41 2005-05-29 10:39:46Z tilman $ - require "rake/clean" require "rake/testtask" require "rake/rdoctask" @@ -7,22 +5,25 @@ 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 = File.read("lib/redact/redact.rb"). match(/^\s*VERSION = \"(.*)\"\s*$/).captures.first +PKG_FILES = FileList[ + "AUTHORS", "COPYING", "ChangeLog", "NEWS", "README", "Rakefile", + "TODO", + "bin/redact", "lib/redact/app.rb", "lib/redact/part.rb", + "lib/redact/program.rb", "lib/redact/redact.rb", + "lib/redact/source.rb", + "test/crossfade.rb", "test/red_rect.rb", "test/test_basic.rb" +] CLOBBER.include("test/*.edj") -sitelibdir = Config::CONFIG["sitelibdir"] -destdir = "#{ENV["DESTDIR"]}" -prefix = ENV["PREFIX"] || "/usr/local" - task :install do |t| + sitelibdir = Config::CONFIG["sitelibdir"] + destdir = "#{ENV["DESTDIR"]}" + prefix = ENV["PREFIX"] || "/usr/local" + ddir = destdir + prefix + "/bin" FileUtils::Verbose.install("bin/redact", ddir, :mode => 0755) @@ -45,21 +46,26 @@ 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", + t.rdoc_files.include("README", "COPYING", "AUTHORS", "TODO", "NEWS", "lib/redact/redact.rb", "lib/redact/part.rb", "lib/redact/program.rb") end +CLOBBER.include("ChangeLog") + +file "ChangeLog" do + `git log > ChangeLog` +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") + t.package_files = PKG_FILES end task :publish => [:rdoc, :package] do p = Rake::CompositePublisher.new p.add(Rake::SshFreshDirPublisher.new("code-monkey.de", - "public_html/docs/" + + "public_docs/" + PKG_NAME, "doc")) p.add(Rake::SshFilePublisher.new("code-monkey.de", ".", "pkg",