lib/buildr/core/build.rb
def extract_version
      buildfile = File.read(Buildr.application.buildfile.to_s)
      buildfile.scan(THIS_VERSION_PATTERN)[0][2]
    rescue
      fail 'Looking for THIS_VERSION = "..." in your Buildfile, none found'
    end
# :call-seq:
#   extract_version() => this_versin
#
# Extract the current version number from the buildfile.
# Raise an error if not found.


Extract the current version number from the buildfile.
Raise an error if not found.
Extract the current version number from the buildfile . Raise an error if not found .
def extract_version
      buildfile = File.read(Buildr.application.buildfile.to_s)
      buildfile.scan(THIS_VERSION_PATTERN)[0][2]
    rescue
      fail 'Looking for THIS_VERSION = "..." in your Buildfile, none found'
    end
def extract_version buildfile = File . read ( Buildr . application . buildfile . to_s ) buildfile . scan ( THIS_VERSION_PATTERN ) [ 0 ] [ 2 ] rescue fail 'Looking for THIS_VERSION = "..." in your Buildfile, none found' end
:call-seq:
extract_version() => this_versin
: call - seq : extract_version () = > this_versin