Class: AlpacaBuildTool::BuildManager

Inherits:
Object
  • Object
show all
Defined in:
lib/alpacabuildtool/managers/build_manager.rb

Overview

BuildManager provides methods to build *.sln solutions

Instance Method Summary collapse

Constructor Details

#initialize(solution) ⇒ BuildManager

Creates an instance

solution

solution to be used to configure build manager and to be

built later


13
14
15
16
17
# File 'lib/alpacabuildtool/managers/build_manager.rb', line 13

def initialize(solution)
  @solution = solution
  @package_manager = PackageManager.new(@solution)
  @build_tool = MSBuild.new(@solution.configuration['MSBuild'])
end

Instance Method Details

#build(debug, update_version) ⇒ Object

Build solution

debug

set to build in debug mode

+update_version

set to update AssemblyInfo.cs files for all solution

projects


25
26
27
28
29
30
# File 'lib/alpacabuildtool/managers/build_manager.rb', line 25

def build(debug, update_version)
  @package_manager.restore_packages
  build_version = @solution.build_version
  @solution.update_projects_version(build_version) if update_version
  @build_tool.build(@solution.file, debug)
end