Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (66 sloc) 2.23 KB
require 'meta_project'
require 'rake'
require 'rake/testtask'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/contrib/xforge'
require 'rubygems'
require 'fileutils'
require '../tools/rakehelp'
$version = IO.read('VERSION').strip
$name = 'activerdf_sesame'
$project = MetaProject::Project::XForge::RubyForge.new('activerdf')
# setup tests
#setup_tests
setup_clean ["pkg", "lib/*.bundle", "*.gem", ".config"]
# setup rdoc
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.add ['README', 'LICENSE', 'lib/**/*.rb', 'doc/**/*.rdoc']
end
desc "Does a full compile, test run"
task :default => [:test, :package]
# define package task
setup_gem($name, $version) do |spec|
spec.summary = "jruby adapter to sesame2 datastore (for usage in ActiveRDF)"
spec.description = spec.summary
spec.author="Benjamin Heitmann <benjamin.heitmann@deri.org>"
spec.add_dependency('gem_plugin', '>= 0.2.1')
spec.add_dependency('activerdf', '>= 1.6.4')
spec.files = FileList[ 'ext/*.jar', '[A-Z]*', 'lib/**/*.rb', 'test/**/*' ].to_a
end
task :build_java do
Dir::chdir(File.expand_path(File.join(File.dirname(__FILE__), 'java')))
`ant`
end
task :verify_rubyforge do
raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
end
desc "Release files on RubyForge."
task :release_files => [:clean, :verify_rubyforge, :package ] do
release_files = FileList["pkg/#$name-#$version.gem"]
Rake::XForge::Release.new($project) do |release|
release.user_name = ENV['RUBYFORGE_USER']
release.password = ENV['RUBYFORGE_PASSWORD']
release.files = release_files.to_a
release.release_name = "#$name #$version"
release.package_name = "activerdf-sesame"
release.release_notes = ""
changes = []
File.open("CHANGELOG") do |file|
current = true
file.each do |line|
line.chomp!
if current and line =~ /^==/
current = false; next
end
break if line.empty? and not current
changes << line
end
end
release.release_changes = changes.join("\n")
end
end