Sha256: 8adb6d2cc2dd2aa21fb959dae273ba5292b1d6ffa1d409244accfac6669be274

Contents?: true

Size: 1.03 KB

Versions: 16

Compression:

Stored size: 1.03 KB

Contents

SUPPORTED_RUBIES = %w[ree 1.9.2 1.9.3 jruby rbx]
PLATFORMS = %w[ree rbx]
GEMSPEC = Bundler::GemHelper.new(Dir.pwd).gemspec

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.join ", "}"
  task :test do
    command = "bundle check || bundle install && rake"
    SUPPORTED_RUBIES.each { |ruby| with_ruby(ruby, command) }
  end

  desc "Build gems for following supported platforms #{PLATFORMS.join ", "}"
  task :build do
    command = "rm -f Gemfile.lock && rake build"
    PLATFORMS.each { |ruby| with_ruby(ruby, command) }
  end

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
libnotify-0.7.3-universal-rubinius-1.2 lib/libnotify/tasks/rubies.rake
libnotify-0.7.3 lib/libnotify/tasks/rubies.rake
libnotify-0.7.2-universal-rubinius-1.2 lib/libnotify/tasks/rubies.rake
libnotify-0.7.2 lib/libnotify/tasks/rubies.rake
libnotify-0.7.1-universal-rubinius-1.2 lib/libnotify/tasks/rubies.rake
libnotify-0.7.1 lib/libnotify/tasks/rubies.rake
libnotify-0.7.0-universal-rubinius-1.2 lib/libnotify/tasks/rubies.rake
libnotify-0.7.0 lib/libnotify/tasks/rubies.rake
libnotify-0.7.0.pre2-universal-rubinius-1.2 lib/libnotify/tasks/rubies.rake
libnotify-0.7.0.pre2 lib/libnotify/tasks/rubies.rake
libnotify-0.7.0.pre-universal-rubinius-1.2 lib/libnotify/tasks/rubies.rake
libnotify-0.7.0.pre lib/libnotify/tasks/rubies.rake
libnotify-0.6.0-universal-rubinius-1.2 lib/libnotify/tasks/rubies.rake
libnotify-0.6.0 lib/libnotify/tasks/rubies.rake
libnotify-0.5.9-universal-rubinius-1.2 lib/libnotify/tasks/rubies.rake
libnotify-0.5.9 lib/libnotify/tasks/rubies.rake