Sha256: 1ded7575069ee2c09d88b54b7c028098818cbd9ea07b107ea4bd16f60d1d5d4f

Contents?: true

Size: 961 Bytes

Versions: 143

Compression:

Stored size: 961 Bytes

Contents

# $Id$

if HAVE_GIT

namespace :git do

  # A prerequisites task that all other tasks depend upon
  task :prereqs

  desc 'Show tags from the Git repository'
  task :show_tags => 'git:prereqs' do |t|
    puts %x/git tag/
  end

  desc 'Create a new tag in the Git repository'
  task :create_tag => 'git:prereqs' do |t|
    v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
    abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version

    tag = "%s-%s" % [PROJ.name, PROJ.version]
    msg = "Creating tag for #{PROJ.name} version #{PROJ.version}"

    puts "Creating Git tag '#{tag}'"
    unless system "git tag -a -m '#{msg}' #{tag}"
      abort "Tag creation failed"
    end

    if %x/git remote/ =~ %r/^origin\s*$/
      unless system "git push origin #{tag}"
        abort "Could not push tag to remote Git repository"
      end
    end
  end

end  # namespace :git

task 'gem:release' => 'git:create_tag'

end  # if HAVE_GIT

# EOF

Version data entries

143 entries across 141 versions & 48 rubygems

Version Path
ckuru-tools-0.0.13 tasks/git.rake
libxml-jruby-modified-1.0.2-jruby tasks/git.rake
libxml-jruby-modified-1.0.1-jruby tasks/git.rake
lijia-rmmseg-cpp-10.2.9.2 tasks/git.rake
Oshuma-pingfm-1.0.0 tasks/git.rake
Oshuma-pingfm-1.0.1 tasks/git.rake
Oshuma-pingfm-1.0.2 tasks/git.rake
Shazburg-webby-0.9.0 tasks/git.rake
TwP-webby-0.9.0 tasks/git.rake
TwP-webby-0.9.1 tasks/git.rake
TwP-webby-0.9.2 tasks/git.rake
TwP-webby-0.9.3 tasks/git.rake
aniero-tire_swing-0.0.2 tasks/git.rake
aniero-tire_swing-0.0.3 tasks/git.rake
aniero-tire_swing-0.0.4 tasks/git.rake
aniero-tire_swing-0.0.5 tasks/git.rake
aniero-tire_swing-0.0.6 tasks/git.rake
aniero-treehouse-0.0.2 tasks/git.rake
briandoll-greatest_common_factor-0.0.1 tasks/git.rake
briandoll-greatest_common_factor-0.0.2 tasks/git.rake