1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
require 'rubygems'
require 'hoe'
$:.unshift "lib"
require 'ditz'
class Hoe
def extra_deps; @extra_deps.reject { |x| Array(x).first == "hoe" } end
end # thanks to "Mike H"
Hoe.new('ditz', Ditz::VERSION) do |p|
p.rubyforge_name = 'ditz'
p.author = "William Morgan"
p.summary = "A simple issue tracker designed to integrate well with distributed version control systems like git and darcs. State is saved to a YAML file kept under version control, allowing issues to be closed/added/modified as part of a commit."
p.description = p.paragraphs_of('README.txt', 4..11).join("\n\n").gsub(/== SYNOPSIS/, "Synopsis:")
p.url = "http://ditz.rubyforge.org"
p.changes = p.paragraphs_of('Changelog', 0..0).join("\n\n")
p.email = "wmorgan-ditz@masanjin.net"
p.extra_deps = [['trollop', '>= 1.9']]
end
WWW_FILES = FileList["www/*"] + %w(README.txt PLUGINS.txt)
task :upload_webpage => WWW_FILES do |t|
sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/ditz/"
end
task :upload_report do |t|
sh "ruby -Ilib bin/ditz html ditz"
sh "rsync -essh -cavz ditz wmorgan@rubyforge.org:/var/www/gforge-projects/ditz/"
end
task :plugins do |t|
sh "ruby -w ./make-plugins.txt.rb > PLUGINS.txt"
end
task :really_check_manifest do |t|
f1 = Tempfile.new "manifest"; f1.close
f2 = Tempfile.new "manifest"; f2.close
sh "git ls-files | egrep -v \"^bugs/\" | sort > #{f1.path}"
sh "sort Manifest.txt > #{f2.path}"
f3 = Tempfile.new "manifest"; f3.close
sh "diff -u #{f1.path} #{f2.path} > #{f3.path}; /bin/true"
left, right = [], []
IO.foreach(f3.path) do |l|
case l
when /^\-\-\-/
when /^\+\+\+/
when /^\-(.*)\n$/; left << $1
when /^\+(.*)\n$/; right << $2
end
end
puts
puts "Tracked by git but not in Manifest.txt:"
puts left.empty? ? " <nothing>" : left.map { |l| " " + l }
puts
puts "In Manifest.txt, but not tracked by git:"
puts right.empty? ? " <nothing>" : right.map { |l| " " + l }
end
# vim: syntax=ruby
|