Sha256: 01d484c565811a073bc47f2714b6d5d8b763763d4148eda71379718d338b74f8

Contents?: true

Size: 1.53 KB

Versions: 2

Compression:

Stored size: 1.53 KB

Contents

$:.unshift File.expand_path("../lib", __FILE__)

require 'rubygems'
require 'rake'
require 'i0n_rails3_generators'

# Runs all tests
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
  test.libs << 'lib' << 'test'
  test.pattern = 'test/**/test_*.rb'
  test.verbose = true
end

namespace :deploy do
    
  desc "Commits changes to local git repo and then pushes to remote"
  task :git do
    git_actions
  end
    
  desc "Builds gemspec and deploys gem to RubyGems.org"
  task :gem do
    rubygems_actions
  end
  
end

namespace :bump do
  
  desc "Bumps major version number by 1"
  task :major do
    I0nRails3Generators.bump_version_major
    git_actions
    rubygems_actions
  end

  desc "Bumps minor version number by 1"
  task :minor do
    I0nRails3Generators.bump_version_minor
    git_actions
    rubygems_actions
  end

  desc "Bumps patch version number by 1"
  task :patch do
    I0nRails3Generators.bump_version_patch
    git_actions
    rubygems_actions
  end
  
end

task :version do
  puts "\nI0nRails3Generators Version: #{I0nRails3Generators::VERSION}"
end

def git_actions
  Dir.chdir("#{I0nRails3Generators::ROOT_PATH}")
  system "git add ."
  system "git commit -v -a -m 'commit for version: #{I0nRails3Generators.version}'"
  system "git tag #{I0nRails3Generators.version}"
  system "git push"
  system "git push --tags"
end

def rubygems_actions
  Dir.chdir("#{I0nRails3Generators::ROOT_PATH}")
  system "gem build i0n_rails3_generators.gemspec"
  system "gem push i0n_rails3_generators-#{I0nRails3Generators.version}.gem"      
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
i0n_rails3_generators-0.2.1 Rakefile
i0n_rails3_generators-0.2.0 Rakefile