Sha256: 24dc7ff747bb662195bf1016de84c6e652daaa3c3dfe0c1fdb79b5a7ce411170

Contents?: true

Size: 1.24 KB

Versions: 534

Compression:

Stored size: 1.24 KB

Contents

if HAVE_SVN

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.path) unless PROJ.svn.path.empty?

namespace :svn do

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

  desc 'Show tags from the SVN repository'
  task :show_tags => 'svn:prereqs' do |t|
    tags = %x/svn list #{File.join(PROJ.svn.root, PROJ.svn.tags)}/
    tags.gsub!(%r/\/$/, '')
    tags = tags.split("\n").sort {|a,b| b <=> a}
    puts tags
  end

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

    svn = PROJ.svn
    trunk = File.join(svn.root, svn.trunk)
    tag = "%s-%s" % [PROJ.name, PROJ.version]
    tag = File.join(svn.root, 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.path

# EOF

Version data entries

534 entries across 519 versions & 113 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/ffi-1.0.11/tasks/svn.rake
classiccms-0.7.4 vendor/bundle/gems/ffi-1.0.11/tasks/svn.rake
classiccms-0.7.3 vendor/bundle/gems/ffi-1.0.11/tasks/svn.rake
TwP-bones-2.3.0 lib/bones/tasks/svn.rake
TwP-bones-2.4.0 lib/bones/tasks/svn.rake
TwP-bones-2.4.1 lib/bones/tasks/svn.rake
TwP-bones-2.4.2 lib/bones/tasks/svn.rake
TwP-bones-2.5.0 lib/bones/tasks/svn.rake
TwP-bones-2.5.1 lib/bones/tasks/svn.rake
blowmage-webby-0.9.4.1 tasks/svn.rake
devver-construct-1.0.0 tasks/svn.rake
devver-construct-1.1.0 tasks/svn.rake
devver-germinate-1.0.0 tasks/svn.rake
devver-germinate-1.0.1 tasks/svn.rake
devver-germinate-1.1.0 tasks/svn.rake
devver-germinate-1.2.0 tasks/svn.rake
devver-germinate-atompub-1.0.1 tasks/svn.rake
devver-germinate-gist-1.0.0 tasks/svn.rake
emonti-buby-1.0.0 tasks/svn.rake
emonti-buby-1.0.1 tasks/svn.rake