File: Rakefile

package info (click to toggle)
ruby-dataobjects-sqlite3 0.10.16-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 312 kB
  • ctags: 124
  • sloc: ansic: 985; ruby: 323; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 1,047 bytes parent folder | download | duplicates (2)
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
require 'rubygems'
require 'pathname'
require 'bundler'
require 'rubygems/package_task'
Bundler::GemHelper.install_tasks

require 'rake'
require 'rake/clean'

ROOT = Pathname(__FILE__).dirname.expand_path

require ROOT + 'lib/do_sqlite3/version'

JRUBY    = RUBY_PLATFORM =~ /java/
IRONRUBY = defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ironruby'
WINDOWS  = Gem.win_platform? || (JRUBY && ENV_JAVA['os.name'] =~ /windows/i)
SUDO     = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])
BINARY_VERSION = '3071700'

CLEAN.include(%w[ {tmp,pkg}/ **/*.{o,so,bundle,jar,log,a,gem,dSYM,obj,pdb,exp,DS_Store,rbc,db} ext/do_sqlite3/Makefile ext-java/target ])


if JRUBY
  Rake::Task['build'].clear_actions   if Rake::Task.task_defined?('build')
  Rake::Task['install'].clear_actions if Rake::Task.task_defined?('install')
  task :build => [ :java, :gem ]
  task :install do
    sh "#{Config::CONFIG['RUBY_INSTALL_NAME']} -S gem install pkg/do_sqlite3-#{DataObjects::Sqlite3::VERSION}-java.gem"
  end
end

FileList['tasks/**/*.rake'].each { |task| import task }