Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5ec4ede3e1
Fetching contributors…

Cannot retrieve contributors at this time

file 21 lines (17 sloc) 0.911 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
require 'tool/version'

def gem(*args) sh("gem", *args.map(&:to_s)) end
def git(*args) sh("git", *args.map(&:to_s)) end
  
gem_file = "tool-#{Tool::VERSION}.gem"
version = "v#{Tool::VERSION}"
message = "Release #{version}"

task(:spec) { ruby "-S rspec spec" }
task(:build) { gem :build, 'tool.gemspec' }
task(:install => :build) { gem :install, gem_file }
task(:publish => :install) { gem :push, gem_file }
task(:commit) { git :commit, '--allow-empty', '-m', message }
task(:tag) { git :tag, '-s', '-m', message, version }
task(:push) { git(:push) and git(:push, '--tags') }

task :release => [:spec, :commit, :publish, :tag, :push]
task :default => :spec
task :test => :spec
Something went wrong with that request. Please try again.