Class: XBuild
- Inherits:
-
Object
- Object
- XBuild
- Includes:
- Albacore::RunCommand, Albacore::Task
- Defined in:
- lib/albacore/xbuild.rb
Constant Summary collapse
- TaskName =
[:xbuild, :mono]
Instance Attribute Summary collapse
-
#solution ⇒ Object
Returns the value of attribute solution.
-
#verbosity ⇒ Object
Returns the value of attribute verbosity.
Attributes included from Albacore::RunCommand
Attributes included from Logging
Instance Method Summary collapse
- #build_properties ⇒ Object
- #build_solution(solution) ⇒ Object
- #build_targets ⇒ Object
- #check_solution(file) ⇒ Object
- #execute ⇒ Object
-
#initialize ⇒ XBuild
constructor
A new instance of XBuild.
Methods included from Albacore::RunCommand
Methods included from AttrMethods
Methods included from Albacore::Task
clean_dirname, create_rake_task, include_config, included
Methods included from UpdateAttributes
Methods included from YAMLConfig
#configure, #load_config_by_task_name
Methods included from Logging
#create_logger, #log_device=, #log_level, #log_level=
Methods included from Failure
Constructor Details
#initialize ⇒ XBuild
Returns a new instance of XBuild.
12 13 14 15 16 |
# File 'lib/albacore/xbuild.rb', line 12 def initialize @command = 'xbuild' super() update_attributes Albacore.configuration.xbuild.to_hash end |
Instance Attribute Details
#solution ⇒ Object
Returns the value of attribute solution.
8 9 10 |
# File 'lib/albacore/xbuild.rb', line 8 def solution @solution end |
#verbosity ⇒ Object
Returns the value of attribute verbosity.
8 9 10 |
# File 'lib/albacore/xbuild.rb', line 8 def verbosity @verbosity end |
Instance Method Details
#build_properties ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/albacore/xbuild.rb', line 47 def build_properties option_text = [] @properties.each do |key, value| option_text << "/p:#{key}\=\"#{value}\"" end option_text.join(" ") end |
#build_solution(solution) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/albacore/xbuild.rb', line 22 def build_solution(solution) check_solution solution command_parameters = [] command_parameters << "\"#{solution}\"" command_parameters << "\"/verbosity:#{@verbosity}\"" if @verbosity != nil command_parameters << build_properties if @properties != nil command_parameters << "\"/target:#{build_targets}\"" if @targets != nil result = run_command "xBuild", command_parameters.join(" ") = 'xBuild Failed. See Build Log For Detail' if !result end |
#build_targets ⇒ Object
43 44 45 |
# File 'lib/albacore/xbuild.rb', line 43 def build_targets @targets.join ";" end |
#check_solution(file) ⇒ Object
37 38 39 40 41 |
# File 'lib/albacore/xbuild.rb', line 37 def check_solution(file) return if file msg = 'solution cannot be nil' msg end |
#execute ⇒ Object
18 19 20 |
# File 'lib/albacore/xbuild.rb', line 18 def execute build_solution(@solution) end |