Last active
March 9, 2016 16:16
-
-
Save phstc/762965 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rake' | |
require 'rake/testtask' | |
require File.expand_path('../lib/mongomapper_id2/version', __FILE__) | |
Rake::TestTask.new(:test) do |test| | |
test.libs << 'lib' << 'test' | |
test.pattern = 'test/{functional,unit}/**/*_test.rb' | |
end | |
namespace :test do | |
Rake::TestTask.new(:lint) do |test| | |
test.libs << 'lib' << 'test' | |
test.pattern = 'test/test_active_model_lint.rb' | |
end | |
task :all => ['test', 'test:lint'] | |
end | |
task :default => 'test:all' | |
desc 'Builds the gem' | |
task :build do | |
sh "gem build mongomapper_id2.gemspec" | |
end | |
desc 'Builds and installs the gem' | |
task :install => :build do | |
sh "gem install mongomapper_id2-#{MongomapperId2::VERSION}" | |
end | |
desc 'Tags version, pushes to remote, and pushes gem' | |
task :release => :build do | |
sh "git tag v#{MongomapperId2::VERSION}" | |
sh "git push origin master" | |
sh "git push origin v#{MongomapperId2::VERSION}" | |
sh "gem push mongomapper_id2-#{MongomapperId2::VERSION}.gem" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment