Ship a ChangeLog generated from "git log". master
authorTilman Sauerbeck <tilman@code-monkey.de>
Sun, 1 Oct 2006 16:04:47 +0000 (18:04 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sun, 1 Oct 2006 18:04:47 +0000 (18:04 +0000)
Rakefile

index 7d06ba7..1f40c62 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,3 +1,4 @@
+require "rake/clean"
 require "rake/packagetask"
 require "rake/contrib/sshpublisher"
 
 require "rake/packagetask"
 require "rake/contrib/sshpublisher"
 
@@ -5,6 +6,12 @@ PKG_NAME = "snett"
 PKG_VERSION = File.read("bin/snett").
               match(/^\s*VERSION = \"(.*)\"\s$/).captures.first
 
 PKG_VERSION = File.read("bin/snett").
               match(/^\s*VERSION = \"(.*)\"\s$/).captures.first
 
+CLOBBER.include("ChangeLog")
+
+file "ChangeLog" do
+       sh("git-log > ChangeLog")
+end
+
 task :install do
        destdir = ENV["DESTDIR"] || ""
        prefix = ENV["PREFIX"] || "/usr/local"
 task :install do
        destdir = ENV["DESTDIR"] || ""
        prefix = ENV["PREFIX"] || "/usr/local"
@@ -20,9 +27,12 @@ task :install do
        FileUtils::Verbose.install(Dir["data/*"], ddir, :mode => 0644)
 end
 
        FileUtils::Verbose.install(Dir["data/*"], ddir, :mode => 0644)
 end
 
+task :package => ["ChangeLog"]
+
 Rake::PackageTask.new(PKG_NAME, PKG_VERSION) do |t|
        t.need_tar_gz = true
 Rake::PackageTask.new(PKG_NAME, PKG_VERSION) do |t|
        t.need_tar_gz = true
-       t.package_files.include("[A-Z]*", "bin/snett", "data/logo*")
+       t.package_files.include("[A-Z]*", "ChangeLog",
+                               "bin/snett", "data/logo*")
 end
 
 task :publish => [:package] do
 end
 
 task :publish => [:package] do