Class: Build

Inherits:
Array
  • Object
show all
Defined in:
lib/build.rb

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Build

Returns a new instance of Build.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/build.rb', line 6

def initialize
  # Gem builds, `gem build dev_tasks.spec`
	Dir.glob('*.gemspec') {|f|
 self.add "gem build #{f}"
	}
	# .sln builds, `"C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe" "MySolution.sln"
	msbuild=MSBuild.new
	Dir.glob('**/*.sln'){|f|
 vs_version=MSBuild.get_vs_version(f)
 if File.exist? msbuild[vs_version]
   MSBuild.get_configurations(f).each{ |configuration|
  MSBuild.get_platforms(f).each{|platform|
    self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"#{platform}\""
  }
  #self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"Any CPU\""
}
   #self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=Release /p:Platform=\"Any CPU\""
 end
	}
end

Instance Method Details

#add(command) ⇒ Object

def self.msbuild "C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe" end



31
32
33
# File 'lib/build.rb', line 31

def add command
  self << command if(!include?(command))
end