Class: Bozo::Compilers::WebProject2010

Inherits:
Project
  • Object
show all
Defined in:
lib/bozo/compilers/msbuild.rb

Instance Method Summary collapse

Methods inherited from Project

#clean, #framework_version, #generate_args, #initialize, #location, #name, #project_path, #temp_project_path, #windowsize_path

Constructor Details

This class inherits a constructor from Bozo::Compilers::Project

Instance Method Details

#build(configuration) ⇒ Object



257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/bozo/compilers/msbuild.rb', line 257

def build(configuration)
  super(configuration)

  unless configuration[:websites_as_zip]
    log_info File.join(project_path, '**', 'Web.*.config')
    Dir[File.join(project_path, '**', 'Web.*.config')].each do |source_file|
      destination = File.join(temp_project_path, source_file.sub(project_path, ''))
      log_info "Copying #{source_file} to #{destination}"
      FileUtils.mkdir_p File.dirname(destination)
      FileUtils.cp source_file, destination
    end
  end
end

#populate_config(config) ⇒ Object



244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/bozo/compilers/msbuild.rb', line 244

def populate_config(config)
  config[:targets] << :package

  if config[:websites_as_zip]
    config[:properties][:packagelocation] = location + '/Site.zip'
    config[:properties][:packageassinglefile] = true
  else
    config[:properties][:_packagetempdir] = temp_project_path
  end

  config[:properties][:solutiondir] = windowsize_path(File.expand_path('.') + '//')
end