openstudiocore/ruby/openstudio/energyplus/find_energyplus.rb
# return the build version from a file path

return the build version from a file path
return the build version from a file path
def build_version(f)
      version = 0 
      if match_data = /(\d+)-(\d+)-(\d+)-(\d+)/.match(f)
        version = match_data[4].to_i
      elsif match_data = /(\d+-\d+-\d+)/.match(f)
        case match_data[1].to_s
          when "8-0-0"
            version = 8
          when "7-2-0"
            version = 6
          when "7-1-0"
            version = 12
          when "7-0-0"
            version = 24
          when "6-0-0"
            version = 23
          when "5-0-0"
            version = 31
          when "4-0-0"
            version = 24
          end        
      end
      return version
    end
def build_version ( f ) version = 0 if match_data = / ( \d +)-( \d +)-( \d +)-( \d +) / . match ( f ) version = match_data [ 4 ] . to_i elsif match_data = / ( \d +- \d +- \d +) / . match ( f ) case match_data [ 1 ] . to_s when "8-0-0" version = 8 when "7-2-0" version = 6 when "7-1-0" version = 12 when "7-0-0" version = 24 when "6-0-0" version = 23 when "5-0-0" version = 31 when "4-0-0" version = 24 end end return version end
return the build version from a file path
return the build version from a file path
# was nil
 # register each release version

f