Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fd29f9de88
Fetching contributors…

Cannot retrieve contributors at this time

file 41 lines (33 sloc) 0.753 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
require File.dirname(__FILE__) + '/lib/hn2json/version'

def command?(command)
  system("type #{command} > /dev/null 2>&1")
end

#
# Gems
#

desc "Build gem."
task :gem do
  sh "gem build hn2json.gemspec"
end

task :push => [:gem] do
  file = Dir["*-#{HN2JSON::VERSION}.gem"].first
  sh "gem push #{file}"
end

desc "Install gem."
task :install => [:gem] do
  sh "gem install hn2json-#{HN2JSON::VERSION}.gem"
end

desc "Build the gem, install it and open irb."
task :irb => [:install] do
  sh "irb -r hn2json"
end

desc "tag version"
task :tag do
  sh "git tag v#{HN2JSON::VERSION}"
  sh "git push origin master --tags"
  sh "git clean -fd"
end

desc "tag version and push gem to server"
task :release => [:push, :tag] do
  puts "And away it goes!"
end
Something went wrong with that request. Please try again.