Sha256: 3d0798d1acd389d6c5c96dabda1a795842947a09ad596f3504d66d5f0e3a56b6

Contents?: true

Size: 1023 Bytes

Versions: 2

Compression:

Stored size: 1023 Bytes

Contents

lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'ttycaca/version'

GEMNAME    = 'ttycaca'
GEMVERSION = Ttycaca::VERSION
GEM        = "#{GEMNAME}-#{GEMVERSION}.gem"
GEMSPEC    = `git ls-files | grep gemspec`.chomp

desc "Build #{GEMNAME}.gem"
task :build => :perms do
  system "gem", "build", GEMSPEC
end

desc "Ensure correct permissions for #{GEMNAME}.gem"
task :perms do
  system "chmod", "-R", "a+rX", *`git ls-files`.chomp.split("\n")
end

desc "Tag the latest version of #{GEMNAME}"
task :tag do
  system "git", "tag", "-s", "-m", "#{GEMNAME} v#{GEMVERSION}", "v#{GEMVERSION}"
end

desc "Install #{GEMNAME}.gem"
task :install => :build do
  system "gem", "install", GEM
end

desc "Push gem to RubyGems"
task :release => [:tag, :build] do
  fail 'Cannot release a dev version' if Ttycaca::VERSION.end_with?('dev')
  system "gem", "push", GEM
end

desc "Clean built products"
task :clean do
  rm Dir.glob("*.gem"), :verbose => true
end

task :default => :build

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ttycaca-1.0.1 Rakefile
ttycaca-1.0.0 Rakefile