Sha256: 35d8196116a1f4a4780229b05b246730162fe51524c05fa9bdd8b6f6c9eae666

Contents?: true

Size: 1.12 KB

Versions: 108

Compression:

Stored size: 1.12 KB

Contents

# $Id$


if PROJ.svn and system("svn --version 2>&1 > #{DEV_NULL}")

unless PROJ.svn_root
  info = %x/svn info ./
  m = %r/^Repository Root:\s+(.*)$/.match(info)
  PROJ.svn_root = (m.nil? ? '' : m[1])
end
PROJ.svn_root = File.join(PROJ.svn_root, PROJ.svn) if String === PROJ.svn

namespace :svn do

  desc 'Show tags from the SVN repository'
  task :show_tags do |t|
    tags = %x/svn list #{File.join(PROJ.svn_root, PROJ.svn_tags)}/
    tags.gsub!(%r/\/$/, '')
    puts tags
  end

  desc 'Create a new tag in the SVN repository'
  task :create_tag 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

    trunk = File.join(PROJ.svn_root, PROJ.svn_trunk)
    tag = "%s-%s" % [PROJ.name, PROJ.version]
    tag = File.join(PROJ.svn_root, PROJ.svn_tags, tag)
    msg = "Creating tag for #{PROJ.name} version #{PROJ.version}"

    puts "Creating SVN tag '#{tag}'"
    unless system "svn cp -m '#{msg}' #{trunk} #{tag}"
      abort "Tag creation failed" 
    end
  end

end  # namespace :svn

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

end  # if PROJ.svn

# EOF

Version data entries

108 entries across 101 versions & 23 rubygems

Version Path
Peeja-rubot-0.5.0 tasks/svn.rake
derailed-mole-1.0.10 tasks/svn.rake
derailed-ziya-2.0.4 tasks/svn.rake
derailed-ziya-2.0.6 tasks/svn.rake
derailed-ziya-2.0.8 tasks/svn.rake
derailed-ziya-2.1.0 tasks/svn.rake
derailed-ziya-2.1.1 tasks/svn.rake
derailed-ziya-2.1.2 tasks/svn.rake
derailed-ziya-2.1.3 tasks/svn.rake
derailed-ziya-2.1.4 tasks/svn.rake
derailed-ziya-2.1.5 tasks/svn.rake
topfunky-castanaut-1.0.1 tasks/svn.rake
plexus-rmmseg-0.1.6 tasks/svn.rake
loyal_rmmseg-0.0.2 tasks/svn.rake
ziya-2.1.7 tasks/svn.rake
ziya-2.1.6 tasks/svn.rake
bones-1.3.4 data/tasks/svn.rake
bones-1.3.5 tasks/svn.rake
bones-1.3.3 data/tasks/svn.rake
bones-1.3.5 data/tasks/svn.rake