Class: Build
- Inherits:
-
Array
- Object
- Array
- Build
- Defined in:
- lib/build.rb
Class Method Summary collapse
Instance Method Summary collapse
- #add(command) ⇒ Object
-
#initialize ⇒ Build
constructor
A new instance of Build.
Constructor Details
#initialize ⇒ Build
Returns a new instance of Build.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/build.rb', line 5 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" Dir.glob('*.sln'){|f| if File.exist? Build.msbuild self.add "\"#{Build.msbuild}\" \"#{f}\" /nologo /p:Configuration=Release" end } end |
Class Method Details
.msbuild ⇒ Object
18 19 20 |
# File 'lib/build.rb', line 18 def self.msbuild "C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe" end |
Instance Method Details
#add(command) ⇒ Object
22 23 24 |
# File 'lib/build.rb', line 22 def add command self << command if(!include?(command)) end |