Sha256: a6fdd276c69e286470791d504bf7fa47725f157008d967000b47c4249291acc5

Contents?: true

Size: 1.18 KB

Versions: 2

Compression:

Stored size: 1.18 KB

Contents

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

GEMSPEC = `git ls-files | grep gemspec`.chomp
GEM     = "usaidwat-#{USaidWat::VERSION}.gem"

desc "Build usaidwat.gem"
task :build => :perms do
  system "gem", "build", GEMSPEC
end

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

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

desc "Install usaidwat.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 USaidWat::VERSION.end_with?('dev')
  system "gem", "push", GEM
end

desc "Run the test suite"
task :test do
  ok = system "bundle", "exec", "rspec"
  fail if !ok
  system "bundle", "exec", "cucumber", "-f", "progress"
end

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

desc "Show current version number"
task :version do
  puts USaidWat::VERSION
end

task :default => :build

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
usaidwat-1.6.1 Rakefile
usaidwat-1.6.0 Rakefile