def set_new_cb_version
      metadata_file = File.join(@cb_path, 'metadata.rb')
      fi = File.read(metadata_file)
      fi.gsub!(/version(\s+)('|")#{@cb_version.to_s}('|")/, "version\\1\\2#{@target_version}\\3")
      File.open(metadata_file, 'w') { |file| file.puts fi }
    end
def set_new_cb_version
      metadata_file = File.join(@cb_path, 'metadata.rb')
      fi = File.read(metadata_file)
      fi.gsub!(/version(\s+)('|")#{@cb_version.to_s}('|")/, "version\\1\\2#{@target_version}\\3")
      File.open(metadata_file, 'w') { |file| file.puts fi }
    end
Replace the existing version string with the new version