Sha256: 9ecdc07fbb652e229fc5cebc0fa630417e57e37872e0b1926602ad76b4f81667

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

require "rspec/core/rake_task"
require "certmeister/version"

desc 'Build gem into the pkg directory'
task :build => :spec do
  FileUtils.rm_rf('pkg')
  Dir['*.gemspec'].each do |gemspec|
    system "gem build #{gemspec}"
  end
  FileUtils.mkdir_p('pkg')
  FileUtils.mv(Dir['*.gem'], 'pkg')
end

namespace :bump do
  bump_version = ->(component) do
    sh 'bundle', 'exec', 'semver', 'inc', component
    puts "Remember to update Gemfile.lock with bundle install"
  end

  desc 'Bump version [major]'
  task :major do
    bump_version.call('major')
  end
  desc 'Bump version [minor]'
  task :minor do
    bump_version.call('minor')
  end
  desc 'Bump version [patch]'
  task :patch do
    bump_version.call('patch')
  end
end

desc 'Tags version, pushes to remote, and pushes gem'
task :release => :build do
  sh 'git', 'tag', '-m', "Released v#{Certmeister::VERSION}", "v#{Certmeister::VERSION}"
  sh "git push origin master"
  sh "git push origin v#{Certmeister::VERSION}"
  sh "ls pkg/*.gem | xargs -n 1 gem push"
end

RSpec::Core::RakeTask.new(:spec)

task :default => :spec

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
certmeister-0.3.1 Rakefile
certmeister-0.3.0 Rakefile