Browse Source

* A Rakefile I often re-use.

master
Erik Hollensbe 13 years ago
commit
356dd12ef7
  1. 85
      Rakefile

85
Rakefile

@ -0,0 +1,85 @@
# $Id$
$:.push 'lib'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'fileutils'
require 'gk-lib'
include FileUtils::Verbose
task :default => [ :dist ]
task :fixperms do
chmod(0755, Dir['bin/*'])
end
#
# Tests
#
Rake::TestTask.new do |t|
t.libs << 'lib'
t.test_files = FileList['test/test*.rb']
t.verbose = true
end
#
# Distribution
#
task :dist => [:fixperms, :repackage, :gem, :rdoc]
task :distclean => [:clobber_package, :clobber_rdoc]
task :clean => [:distclean]
#
# Documentation
#
Rake::RDocTask.new do |rd|
rd.rdoc_dir = "rdoc"
#rd.main = "README.rdoc"
rd.rdoc_files.include("./lib/**/*.rb")
# rd.rdoc_files.include("./bin/**/*")
# rd.rdoc_files.include("README.rdoc")
# rd.rdoc_files.include("COPYING.rdoc")
rd.options = %w(-ap)
end
#
# Packaging
#
spec = Gem::Specification.new do |s|
s.name = "gitkeeper"
s.version = GK::VERSION
s.author = "Erik Hollensbe"
s.email = "erik@hollensbe.org"
s.summary = "A commandline client for interfacing with Weblogs via XML-RPC"
s.bindir = 'bin'
s.executables = Dir['bin/**/*'].collect { |x| File.basename(x) }
s.files = Dir["lib/**/*"] + Dir['bin/*']
s.add_dependency 'git', '>= 1.0.5'
s.add_dependency 'trollop', '>= 1.10.2'
s.add_dependency 'highline', '>= 1.5.0'
s.has_rdoc = true
s.rubyforge_project = 'gitkeeper'
end
Rake::GemPackageTask.new(spec) do |s|
end
Rake::PackageTask.new(spec.name, spec.version) do |p|
p.need_tar_gz = true
p.need_zip = true
p.package_files.include("./bin/**/*")
p.package_files.include("./Rakefile")
#p.package_files.include("./setup.rb")
p.package_files.include("./lib/**/*.rb")
#p.package_files.include("README.rdoc")
end
Loading…
Cancel
Save