Sha256: 94698baa1b882dfbdb3e05de118192b500c0f29a5e79295fc2fc8c6a7009b35c

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

SUPPORTED_RUBIES = %w[ree 1.9.2 jruby rbx]

GEMSPEC = Bundler::GemHelper.new(Dir.pwd).gemspec

def with_rubies(command)
  SUPPORTED_RUBIES.each do |ruby|
    with_ruby(ruby, command)
  end
end

def with_ruby(ruby, command)
  rvm     = "#{ruby}@#{GEMSPEC.name}"
  command = %{rvm #{rvm} exec bash -c '#{command}'}

  puts "\n" * 3
  puts "CMD: #{command}"
  puts "=" * 40

  system command
end

namespace :rubies do
  desc "Run tests for following supported platforms #{SUPPORTED_RUBIES.inspect}"
  task :test do
    command = "bundle check || bundle install && rake"
    with_rubies(command)
  end

  desc "Build gems for following supported platforms #{SUPPORTED_RUBIES.inspect}"
  task :build do
    command = "rake build"
    with_rubies(command)
  end

  desc "Pushes gems for following supported platforms #{SUPPORTED_RUBIES.inspect}"
  #task :push => :build do
  task :push do
    Dir[File.join("pkg", "#{GEMSPEC.name}-#{GEMSPEC.version}*.gem")].each do |gem|
      command = "gem push #{gem}"
      puts command
      system command
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
libnotify-0.5.1-x86-linux lib/libnotify/tasks/rubies.rake