Class: RakeDotNet::MsBuildCmd
- Inherits:
-
Object
- Object
- RakeDotNet::MsBuildCmd
- Defined in:
- lib/rake_dotnet.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
Returns the value of attribute project.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#targets ⇒ Object
Returns the value of attribute targets.
-
#verbosity ⇒ Object
Returns the value of attribute verbosity.
Instance Method Summary collapse
- #cmd ⇒ Object
-
#initialize(project = 'default.proj', properties = {}, targets = [], verbosity = 'n', working_dir = nil) ⇒ MsBuildCmd
constructor
A new instance of MsBuildCmd.
- #run ⇒ Object
Constructor Details
#initialize(project = 'default.proj', properties = {}, targets = [], verbosity = 'n', working_dir = nil) ⇒ MsBuildCmd
Returns a new instance of MsBuildCmd.
726 727 728 729 730 731 732 733 |
# File 'lib/rake_dotnet.rb', line 726 def initialize(project='default.proj', properties={}, targets=[], verbosity='n', working_dir=nil) @project = project @properties = properties @targets = targets @verbosity = verbosity @working_dir = working_dir @exe = '"' + File.join(ENV['windir'].dup, 'Microsoft.NET', 'Framework', 'v3.5', 'msbuild.exe') + '"' end |
Instance Attribute Details
#project ⇒ Object
Returns the value of attribute project.
724 725 726 |
# File 'lib/rake_dotnet.rb', line 724 def project @project end |
#properties ⇒ Object
Returns the value of attribute properties.
724 725 726 |
# File 'lib/rake_dotnet.rb', line 724 def properties @properties end |
#targets ⇒ Object
Returns the value of attribute targets.
724 725 726 |
# File 'lib/rake_dotnet.rb', line 724 def targets @targets end |
#verbosity ⇒ Object
Returns the value of attribute verbosity.
724 725 726 |
# File 'lib/rake_dotnet.rb', line 724 def verbosity @verbosity end |
Instance Method Details
#cmd ⇒ Object
735 736 737 |
# File 'lib/rake_dotnet.rb', line 735 def cmd "#{@exe} #{project} /maxcpucount /v:#{@verbosity} /p:#{properties} /t:#{targets}" end |
#run ⇒ Object
739 740 741 742 743 744 745 746 |
# File 'lib/rake_dotnet.rb', line 739 def run if @working_dir chdir(@working_dir) do puts cmd if VERBOSE sh cmd end end end |