Class: Buildr::SvnRelease

Inherits:
Release show all
Defined in:
lib/buildr/core/build.rb

Constant Summary

Constants inherited from Release

Release::THIS_VERSION_PATTERN

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Release

add, #extract_version, find, list, #make, #tag_name

Class Method Details

.applies_to?Boolean

Returns:

  • (Boolean)


426
427
428
# File 'lib/buildr/core/build.rb', line 426

def applies_to?
  File.exist?('.svn')
end

Instance Method Details

#checkObject



431
432
433
434
# File 'lib/buildr/core/build.rb', line 431

def check
  fail "Uncommitted files violate the First Principle Of Release!\n"+Svn.uncommitted_files.join("\n") unless Svn.uncommitted_files.empty?
  fail "SVN URL must contain 'trunk' or 'branches/...'" unless Svn.repo_url =~ /(trunk)|(branches.*)$/
end

#tag_release(tag) ⇒ Object



436
437
438
439
# File 'lib/buildr/core/build.rb', line 436

def tag_release(tag)
  info "Tagging release #{tag}"
  Svn.tag tag
end

#update_version_to_nextObject



441
442
443
444
445
# File 'lib/buildr/core/build.rb', line 441

def update_version_to_next
  super
  info "Current version is now #{extract_version}"
  Svn.commit Buildr.application.buildfile.to_s, message
end